Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DebugWindowFactory"/> class.
        /// </summary>
        /// <param name="hostEnvironment"><see cref="IHostEnvironment"/>.</param>
        /// <param name="messageManager"><see cref="DebugWindowMessageManager"/>.</param>
        /// <param name="options"><see cref="DebugWindowLoggerOptions"/>.</param>
        /// <param name="configureAction"><see cref="DebugWindowConfigureAction"/>.</param>
        /// <param name="configureTabAction"><see cref="DebugWindowConfigureTabAction"/>.</param>
        public DebugWindowFactory(
            IHostEnvironment hostEnvironment,
            DebugWindowMessageManager messageManager,
            IOptionsMonitor <DebugWindowLoggerOptions> options,
            DebugWindowConfigureAction?configureAction       = null,
            DebugWindowConfigureTabAction?configureTabAction = null)
        {
            _HostEnvironment = hostEnvironment;
            _MessageManager  = messageManager;
            _Options         = options;

            _ConfigureAction    = configureAction;
            _ConfigureTabAction = configureTabAction;
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DebugWindow"/> class.
        /// </summary>
        /// <param name="hostEnvironment"><see cref="IHostEnvironment"/>.</param>
        /// <param name="messageManager"><see cref="DebugWindowMessageManager"/>.</param>
        /// <param name="options"><see cref="DebugWindowLoggerOptions"/>.</param>
        /// <param name="configureAction"><see cref="DebugWindowConfigureAction"/>.</param>
        /// <param name="configureTabAction"><see cref="DebugWindowConfigureTabAction"/>.</param>
        public DebugWindow(
            IHostEnvironment hostEnvironment,
            DebugWindowMessageManager messageManager,
            IOptionsMonitor <DebugWindowLoggerOptions> options,
            DebugWindowConfigureAction?configureAction       = null,
            DebugWindowConfigureTabAction?configureTabAction = null)
        {
            _HostEnvironment = hostEnvironment ?? throw new ArgumentNullException(nameof(hostEnvironment));
            _MessageManager  = messageManager ?? throw new ArgumentNullException(nameof(messageManager));
            _Options         = options ?? throw new ArgumentNullException(nameof(options));

            _ConfigureAction    = configureAction;
            _ConfigureTabAction = configureTabAction;

            InitializeControls();

            ApplyOptions(options.CurrentValue);
            _OptionsReloadToken = _Options.OnChange(ApplyOptions);

            Task.Factory.StartNew(MessageProcessingTask, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default);
        }
Exemple #3
0
 public DebugWindowLogger(string categoryName, DebugWindowMessageManager messageManager)
 {
     _CategoryName   = categoryName;
     _MessageManager = messageManager;
 }
 public DebugWindowLoggerProvider(DebugWindowMessageManager messageManager)
 {
     _MessageManager = messageManager;
 }