ServerFactory.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using MediaBrowser.Common.Net;
  2. using MediaBrowser.Controller;
  3. using MediaBrowser.Controller.Configuration;
  4. using MediaBrowser.Controller.Net;
  5. using MediaBrowser.Model.Cryptography;
  6. using MediaBrowser.Model.IO;
  7. using MediaBrowser.Model.Logging;
  8. using MediaBrowser.Model.Net;
  9. using MediaBrowser.Model.Serialization;
  10. using MediaBrowser.Model.Text;
  11. namespace MediaBrowser.Server.Implementations.HttpServer
  12. {
  13. /// <summary>
  14. /// Class ServerFactory
  15. /// </summary>
  16. public static class ServerFactory
  17. {
  18. /// <summary>
  19. /// Creates the server.
  20. /// </summary>
  21. /// <returns>IHttpServer.</returns>
  22. public static IHttpServer CreateServer(IServerApplicationHost applicationHost,
  23. ILogManager logManager,
  24. IServerConfigurationManager config,
  25. INetworkManager networkmanager,
  26. IMemoryStreamFactory streamProvider,
  27. string serverName,
  28. string defaultRedirectpath,
  29. ITextEncoding textEncoding,
  30. ISocketFactory socketFactory,
  31. ICryptoProvider cryptoProvider,
  32. IJsonSerializer json,
  33. IXmlSerializer xml)
  34. {
  35. return new HttpListenerHost(applicationHost, logManager, config, serverName, defaultRedirectpath, networkmanager, streamProvider, textEncoding, socketFactory, cryptoProvider, json, xml);
  36. }
  37. }
  38. }