/// <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, ILogManager logger, IServerApplicationHost appHost, IHttpServer httpServer, IFileSystem fileSystem)
        {
            Instance = this;
            _libraryManager = libraryManager;
            _logger = logger.GetLogger("MetadataViewer");
            _appHost = appHost;
            _fileSystem = fileSystem;
            _configurationManager = configurationManager;
            _httpServer = httpServer;

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

            _service = new MetadataViewerService(_configurationManager, logger, _fileSystem, _appHost);
            _api = new MetadataViewerApi(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, ILogManager logger, IServerApplicationHost appHost, IHttpServer httpServer, IFileSystem fileSystem)
        {
            Instance              = this;
            _libraryManager       = libraryManager;
            _logger               = logger.GetLogger("MetadataViewer");
            _appHost              = appHost;
            _fileSystem           = fileSystem;
            _configurationManager = configurationManager;
            _httpServer           = httpServer;

            var serviceStackHost = (IAppHost)httpServer;

            serviceStackHost.RawHttpHandlers.Add(ProcessRequestRaw);

            _service = new MetadataViewerService(_configurationManager, logger, _fileSystem, _appHost);
            _api     = new MetadataViewerApi(logger, _service, _libraryManager);
        }