Exemplo n.º 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, 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);
        }
Exemplo n.º 2
0
 public MetadataViewerApi(ILogManager logManager, MetadataViewerService service, ILibraryManager libraryManager)
 {
     _logger         = logManager.GetLogger(GetType().Name);
     _service        = service;
     _libraryManager = libraryManager;
 }