コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="jsonSerializer"></param>
        /// <param name="sessionManager"> </param>
        /// <param name="userDataManager"></param>
        /// <param name="libraryManager"> </param>
        /// <param name="logger"></param>
        /// <param name="httpClient"></param>
        /// <param name="appHost"></param>
        /// <param name="fileSystem"></param>
        public ServerEntryPoint(
            IServerConfigurationManager configurationManager,
            ILibraryManager libraryManager,
            ILibraryMonitor libraryMonitor,
            ILogManager logger,
            IServerApplicationHost appHost,
            IHttpServer httpServer,
            IFileSystem fileSystem,
            ILocalizationManager localizationManager,
            IServerManager serverManager,
            IProviderManager providerManager,
            IFileOrganizationService fileOrganizationService)
        {
            Instance                 = this;
            _libraryManager          = libraryManager;
            _libraryMonitor          = libraryMonitor;
            _logger                  = logger.GetLogger("MovieOrganizer");
            _appHost                 = appHost;
            _fileSystem              = fileSystem;
            _configurationManager    = configurationManager;
            _httpServer              = httpServer;
            _localizationManager     = localizationManager;
            _serverManager           = serverManager;
            _providerManager         = providerManager;
            _fileOrganizationService = fileOrganizationService;

            var serviceStackHost = (IAppHost)httpServer;

            serviceStackHost.RawHttpHandlers.Add(ProcessRequestRaw);

            _service = new MovieOrganizerService(
                _configurationManager,
                logger,
                _fileSystem,
                _appHost,
                _libraryMonitor,
                _libraryManager,
                _localizationManager,
                _serverManager,
                _providerManager,
                _fileOrganizationService);

            _api = new MovieOrganizerApi(logger, _service, _libraryManager);
        }
コード例 #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="jsonSerializer"></param>
        /// <param name="sessionManager"> </param>
        /// <param name="userDataManager"></param>
        /// <param name="libraryManager"> </param>
        /// <param name="logger"></param>
        /// <param name="httpClient"></param>
        /// <param name="appHost"></param>
        /// <param name="fileSystem"></param>
        public ServerEntryPoint(
            IServerConfigurationManager configurationManager, 
            ILibraryManager libraryManager,
            ILibraryMonitor libraryMonitor, 
            ILogManager logger, 
            IServerApplicationHost appHost, 
            IHttpServer httpServer, 
            IFileSystem fileSystem,
            ILocalizationManager localizationManager,
            IServerManager serverManager,
            IProviderManager providerManager,
            IFileOrganizationService fileOrganizationService)
        {
            Instance = this;
            _libraryManager = libraryManager;
            _libraryMonitor = libraryMonitor;
            _logger = logger.GetLogger("MovieOrganizer");
            _appHost = appHost;
            _fileSystem = fileSystem;
            _configurationManager = configurationManager;
            _httpServer = httpServer;
            _localizationManager = localizationManager;
            _serverManager = serverManager;
            _providerManager = providerManager;
            _fileOrganizationService = fileOrganizationService;

            var serviceStackHost = (IAppHost)httpServer;
            serviceStackHost.RawHttpHandlers.Add(ProcessRequestRaw);

            _service = new MovieOrganizerService(
                _configurationManager, 
                logger, 
                _fileSystem, 
                _appHost,
                _libraryMonitor,
                _libraryManager,
                _localizationManager,
                _serverManager,
                _providerManager,
                _fileOrganizationService);

            _api = new MovieOrganizerApi(logger, _service, _libraryManager);
        }