当前位置: 首页>>代码示例>>C#>>正文


C# ILogManager类代码示例

本文整理汇总了C#中ILogManager的典型用法代码示例。如果您正苦于以下问题:C# ILogManager类的具体用法?C# ILogManager怎么用?C# ILogManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ILogManager类属于命名空间,在下文中一共展示了ILogManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SessionWebSocketListener

 /// <summary>
 /// Initializes a new instance of the <see cref="SessionWebSocketListener" /> class.
 /// </summary>
 /// <param name="sessionManager">The session manager.</param>
 /// <param name="logManager">The log manager.</param>
 /// <param name="dtoService">The dto service.</param>
 public SessionWebSocketListener(ISessionManager sessionManager, ILogManager logManager, IDtoService dtoService, IServerApplicationHost appHost)
 {
     _sessionManager = sessionManager;
     _logger = logManager.GetLogger(GetType().Name);
     _dtoService = dtoService;
     _appHost = appHost;
 }
开发者ID:Rycius,项目名称:MediaBrowser,代码行数:13,代码来源:SessionWebSocketListener.cs

示例2: MusicBrainzAlbumProvider

        public MusicBrainzAlbumProvider(ILogManager logManager, IServerConfigurationManager configurationManager, IHttpClient httpClient)
            : base(logManager, configurationManager)
        {
            _httpClient = httpClient;

            Current = this;
        }
开发者ID:RomanDengin,项目名称:MediaBrowser,代码行数:7,代码来源:MusicBrainzAlbumProvider.cs

示例3: WriteToLog

        public void WriteToLog(ILogManager logManager)
        {
            // Enumerate over the input file counters and total up all the matched and unmatched totals.
              UInt32 matchedTotal = 0, unmatchedTotal = 0;
              PerformActionOverInputFileCounters((i) =>
              {
            matchedTotal += i.Matched;
            unmatchedTotal += i.Unmatched;
              });

              logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) processed.", matchedTotal + unmatchedTotal));

              if (matchedTotal + unmatchedTotal == 0)
              {
            // No records processed so nothing more to report.
            return;
              }

              logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) matched.", matchedTotal));
              logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) not matched.", unmatchedTotal));

              // Enumerate over the input file counters and write out the individual totals to the log.
              PerformActionOverInputFileCounters((i) =>
              {
            logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) processed from input file {1}.", i.Matched + i.Unmatched, i.FilePath));
            logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) matched from input file {1}.", i.Matched, i.FilePath));
            logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) not matched from input file {1}.", i.Unmatched, i.FilePath));
              });

              // Enumerate over the output file counters and write out the individual totals to the log.
              foreach (var outputFileCounter in this.outputFileCounters.Values)
              {
            logManager.WriteImportantMessageToJobLog(String.Format("{0} Record(s) written to output file {1}.", outputFileCounter.Total, outputFileCounter.FilePath));
              }
        }
开发者ID:toyners,项目名称:Siftan,代码行数:35,代码来源:StatisticsManager.cs

示例4: MainWindow

        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow" /> class.
        /// </summary>
        /// <param name="logManager">The log manager.</param>
        /// <param name="appHost">The app host.</param>
        /// <param name="configurationManager">The configuration manager.</param>
        /// <param name="userManager">The user manager.</param>
        /// <param name="libraryManager">The library manager.</param>
        /// <param name="jsonSerializer">The json serializer.</param>
        /// <param name="displayPreferencesManager">The display preferences manager.</param>
        /// <exception cref="System.ArgumentNullException">logger</exception>
        public MainWindow(ILogManager logManager, IServerApplicationHost appHost, IServerConfigurationManager configurationManager, IUserManager userManager, ILibraryManager libraryManager, IJsonSerializer jsonSerializer, IDisplayPreferencesRepository displayPreferencesManager)
        {
            if (logManager == null)
            {
                throw new ArgumentNullException("logManager");
            }
            if (appHost == null)
            {
                throw new ArgumentNullException("appHost");
            }
            if (configurationManager == null)
            {
                throw new ArgumentNullException("configurationManager");
            }

            _logger = logManager.GetLogger("MainWindow");
            _appHost = appHost;
            _logManager = logManager;
            _configurationManager = configurationManager;
            _userManager = userManager;
            _libraryManager = libraryManager;
            _jsonSerializer = jsonSerializer;
            _displayPreferencesManager = displayPreferencesManager;

            InitializeComponent();

            Loaded += MainWindowLoaded;
        }
开发者ID:Jon-theHTPC,项目名称:MediaBrowser,代码行数:39,代码来源:MainWindow.xaml.cs

示例5: EpisodeProviderFromXml

 public EpisodeProviderFromXml(ILogManager logManager, IServerConfigurationManager configurationManager, IItemRepository itemRepo, IFileSystem fileSystem)
     : base(logManager, configurationManager)
 {
     _itemRepo = itemRepo;
     _fileSystem = fileSystem;
     Current = this;
 }
开发者ID:Jon-theHTPC,项目名称:MediaBrowser,代码行数:7,代码来源:EpisodeProviderFromXml.cs

示例6: LogForm

        public LogForm(ILogManager logManager)
        {
            InitializeComponent();

            _logManager = logManager;
            _uiThread = TaskScheduler.FromCurrentSynchronizationContext();
        }
开发者ID:bigjohn322,项目名称:MediaBrowser,代码行数:7,代码来源:LogForm.cs

示例7: StatisticsTask

 /// <summary>
 /// Initializes a new instance of the <see cref="ReloadLoggerFileTask" /> class.
 /// </summary>
 /// <param name="logManager">The logManager.</param>
 /// <param name="appHost"></param>
 /// <param name="httpClient"></param>
 public StatisticsTask(ILogManager logManager, IApplicationHost appHost, INetworkManager networkManager, IHttpClient httpClient)
 {
     LogManager = logManager;
     ApplicationHost = appHost;
     NetworkManager = networkManager;
     HttpClient = httpClient;
 }
开发者ID:jscorrea,项目名称:MediaBrowser,代码行数:13,代码来源:StatisticsTask.cs

示例8: MashupInfoRepository

 public MashupInfoRepository(ILogManager logManager, IPluginContext context, ITpBus bus, IMashupScriptStorage scriptStorage)
 {
     _bus = bus;
     _scriptStorage = scriptStorage;
     _log = logManager.GetLogger(GetType());
     _context = context;
 }
开发者ID:FarReachJason,项目名称:Target-Process-Plugins,代码行数:7,代码来源:MashupInfoRepository.cs

示例9: TuneInChannel

        public TuneInChannel(IHttpClient httpClient, ILogManager logManager)
        {
            _httpClient = httpClient;
            _logger = logManager.GetLogger(GetType().Name);

            partnerid = "uD1X52pA";
        }
开发者ID:algel,项目名称:Emby.Channels,代码行数:7,代码来源:TuneInChannel.cs

示例10: SSDPServer

		/// <summary>
		///     Initializes a new instance of the <see cref="SSDPServer" /> class.
		/// </summary>
		/// <param name="logManager">
		///     The <see cref="ILogManager"/> to use for logging the debug information.
		/// </param>
		private SSDPServer(ILogManager logManager = null)
		{
			if (logManager != null)
			{
				this.logger = logManager.GetLogger<SSDPServer>();
			}
		}
开发者ID:iamhenning,项目名称:UPnPLite,代码行数:13,代码来源:SSDPServer.cs

示例11: MediaResource

		/// <summary>
		///		Initializes a new instance of the <see cref="MediaResource"/> class.
		/// </summary>
		/// <param name="logManager">
		///		The log manager to use for logging.
		///	</param>
		public MediaResource(ILogManager logManager = null)
		{
			if (logManager != null)
			{
				this.logger = logManager.GetLogger<MediaResource>();
			}
		}
开发者ID:iamhenning,项目名称:UPnPLite,代码行数:13,代码来源:MediaResource.cs

示例12: RunApplication

        private static void RunApplication(ServerApplicationPaths appPaths, ILogManager logManager, StartupOptions options)
        {
            SystemEvents.SessionEnding += SystemEvents_SessionEnding;

            // Allow all https requests
            ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; });

            var fileSystem = new CommonFileSystem(logManager.GetLogger("FileSystem"), false, true);

            var nativeApp = new NativeApp();

            _appHost = new ApplicationHost(appPaths, logManager, options, fileSystem, "MBServer.Mono", nativeApp);

            if (options.ContainsOption("-v"))
            {
                Console.WriteLine(_appHost.ApplicationVersion.ToString());
                return;
            }

            Console.WriteLine("appHost.Init");

            var initProgress = new Progress<double>();

            var task = _appHost.Init(initProgress);
            Task.WaitAll(task);

            Console.WriteLine("Running startup tasks");

            task = _appHost.RunStartupTasks();
            Task.WaitAll(task);

            task = ApplicationTaskCompletionSource.Task;

            Task.WaitAll(task);
        }
开发者ID:jrags56,项目名称:MediaBrowser,代码行数:35,代码来源:Program.cs

示例13: AudioImageProvider

        /// <summary>
        /// Initializes a new instance of the <see cref="BaseMetadataProvider" /> class.
        /// </summary>
        /// <param name="logManager">The log manager.</param>
        /// <param name="configurationManager">The configuration manager.</param>
        /// <param name="mediaEncoder">The media encoder.</param>
        public AudioImageProvider(ILogManager logManager, IServerConfigurationManager configurationManager, IMediaEncoder mediaEncoder)
            : base(logManager, configurationManager)
        {
            _mediaEncoder = mediaEncoder;

            ImageCache = new FileSystemRepository(Kernel.Instance.FFMpegManager.AudioImagesDataPath);
        }
开发者ID:Jon-theHTPC,项目名称:MediaBrowser,代码行数:13,代码来源:AudioImageProvider.cs

示例14: SearchEngine

        public SearchEngine(ILogManager logManager, ILibraryManager libraryManager, IUserManager userManager)
        {
            _libraryManager = libraryManager;
            _userManager = userManager;

            _logger = logManager.GetLogger("Lucene");
        }
开发者ID:jscorrea,项目名称:MediaBrowser,代码行数:7,代码来源:SearchEngine.cs

示例15: MashupScriptStorage

		public MashupScriptStorage(IPluginContext context, IMashupLocalFolder folder, ILogManager logManager, IMashupLoader mashupLoader)
		{
			_folder = folder;
			_mashupLoader = mashupLoader;
			_log = logManager.GetLogger(GetType());
			_accountName = context.AccountName;
		}
开发者ID:TargetProcess,项目名称:Target-Process-Plugins,代码行数:7,代码来源:MashupScriptStorage.cs


注:本文中的ILogManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。