1 write to _initializedService
Microsoft.Build.Engine.UnitTests (1)
BackEnd\LoggingService_Tests.cs (1)
1094_initializedService = logServiceComponent as LoggingService;
124 references to _initializedService
Microsoft.Build.Engine.UnitTests (124)
BackEnd\LoggingService_Tests.cs (124)
131_initializedService.ShutdownComponent(); 132_initializedService.InitializeComponent(new MockHost()); 146Assert.Equal(LoggingServiceState.Shutdown, _initializedService.ServiceState); 152Assert.Equal(LoggingServiceState.Shutdown, _initializedService.ServiceState); 160Assert.Equal(LoggingServiceState.Shutdown, _initializedService.ServiceState); 179Assert.Equal(LoggingServiceState.Shutdown, _initializedService.ServiceState); 191_initializedService.ShutdownComponent(); 192_initializedService.ShutdownComponent(); 206_initializedService.RegisterLogger(null); 218_initializedService.ShutdownComponent(); 220_initializedService.RegisterLogger(regularILogger); 233_initializedService.RegisterLogger(exceptionLogger); 246_initializedService.RegisterLogger(exceptionLogger); 259_initializedService.RegisterLogger(exceptionLogger); 271Assert.True(_initializedService.RegisterLogger(consoleLogger)); 272Assert.True(_initializedService.RegisterLogger(regularILogger)); 273Assert.NotNull(_initializedService.RegisteredLoggerTypeNames); 276Assert.Equal(3, _initializedService.RegisteredLoggerTypeNames.Count); 277Assert.Contains("Microsoft.Build.BackEnd.Logging.CentralForwardingLogger", _initializedService.RegisteredLoggerTypeNames); 278Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames); 279Assert.Contains("Microsoft.Build.Logging.ConsoleLogger", _initializedService.RegisteredLoggerTypeNames); 282Assert.NotNull(_initializedService.RegisteredSinkNames); 283Assert.Single(_initializedService.RegisteredSinkNames); 294Assert.True(_initializedService.RegisterLogger(consoleLogger)); 295Assert.False(_initializedService.RegisterLogger(consoleLogger)); 296Assert.True(_initializedService.RegisterLogger(regularILogger)); 297Assert.False(_initializedService.RegisterLogger(regularILogger)); 298Assert.NotNull(_initializedService.RegisteredLoggerTypeNames); 300Assert.Equal(3, _initializedService.RegisteredLoggerTypeNames.Count); 301Assert.Contains("Microsoft.Build.BackEnd.Logging.CentralForwardingLogger", _initializedService.RegisteredLoggerTypeNames); 302Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames); 303Assert.Contains("Microsoft.Build.Logging.ConsoleLogger", _initializedService.RegisteredLoggerTypeNames); 306Assert.NotNull(_initializedService.RegisteredSinkNames); 307Assert.Single(_initializedService.RegisteredSinkNames); 321_initializedService.RegisterDistributedLogger(null, null); 333_initializedService.ShutdownComponent(); 340_initializedService.RegisterDistributedLogger(null, description); 361Assert.True(_initializedService.RegisterDistributedLogger(regularILogger, configurableDescription)); 362Assert.True(_initializedService.RegisterDistributedLogger(null, distributedDescription)); 363Assert.NotNull(_initializedService.RegisteredLoggerTypeNames); 366Assert.Equal(4, _initializedService.RegisteredLoggerTypeNames.Count); 367Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger", _initializedService.RegisteredLoggerTypeNames); 368Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames); 369Assert.Contains("Microsoft.Build.Logging.DistributedFileLogger", _initializedService.RegisteredLoggerTypeNames); 370Assert.Contains("Microsoft.Build.BackEnd.Logging.NullCentralLogger", _initializedService.RegisteredLoggerTypeNames); 373Assert.NotNull(_initializedService.RegisteredSinkNames); 374Assert.Equal(2, _initializedService.RegisteredSinkNames.Count); 375Assert.Equal(2, _initializedService.LoggerDescriptions.Count); 399Assert.True(_initializedService.RegisterDistributedLogger(regularILoggerA, configurableDescriptionA)); 400Assert.True(_initializedService.RegisterDistributedLogger(regularILoggerB, configurableDescriptionB)); 401Assert.True(_initializedService.RegisterLogger(regularILoggerC)); 402Assert.NotNull(_initializedService.RegisteredLoggerTypeNames); 404_initializedService.LogBuildStarted(); 409_initializedService.LogBuildFinished(true); 415_initializedService.LogBuildStarted(); 421_initializedService.LogBuildFinished(true); 441Assert.True(_initializedService.RegisterDistributedLogger(regularILogger, description)); 442Assert.False(_initializedService.RegisterDistributedLogger(regularILogger, description)); 445Assert.Equal(2, _initializedService.RegisteredLoggerTypeNames.Count); 446Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger", _initializedService.RegisteredLoggerTypeNames); 447Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames); 450Assert.NotNull(_initializedService.RegisteredSinkNames); 451Assert.Single(_initializedService.RegisteredSinkNames); 452Assert.Single(_initializedService.LoggerDescriptions); 469Assert.True(_initializedService.RegisterDistributedLogger(regularILogger, description)); 470Assert.True(_initializedService.RegisterDistributedLogger(null, description)); 471Assert.Equal(4, _initializedService.RegisteredLoggerTypeNames.Count); 475foreach (string loggerName in _initializedService.RegisteredLoggerTypeNames) 484Assert.Contains("Microsoft.Build.BackEnd.Logging.NullCentralLogger", _initializedService.RegisteredLoggerTypeNames); 485Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames); 488Assert.NotNull(_initializedService.RegisteredSinkNames); 489Assert.Equal(2, _initializedService.RegisteredSinkNames.Count); 490Assert.Equal(2, _initializedService.LoggerDescriptions.Count); 504_initializedService.InitializeNodeLoggers(null, new EventSourceSink(), 3); 515_initializedService.InitializeNodeLoggers(new List<LoggerDescription>(), new EventSourceSink(), 3); 532_initializedService.ShutdownComponent(); 535_initializedService.InitializeNodeLoggers(tempList, new EventSourceSink(), 2); 558_initializedService.InitializeNodeLoggers(loggerDescriptions, sink, 1); 561_initializedService.InitializeNodeLoggers(loggerDescriptions, sink2, 1); 564_initializedService.InitializeNodeLoggers(loggerDescriptions, sink, 1); 566Assert.NotNull(_initializedService.RegisteredLoggerTypeNames); 569Assert.Equal(6, _initializedService.RegisteredLoggerTypeNames.Count); 570Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger", _initializedService.RegisteredLoggerTypeNames); 571Assert.Contains("Microsoft.Build.BackEnd.Logging.CentralForwardingLogger", _initializedService.RegisteredLoggerTypeNames); 574foreach (string loggerName in _initializedService.RegisteredLoggerTypeNames) 586foreach (string loggerName in _initializedService.RegisteredLoggerTypeNames) 598Assert.NotNull(_initializedService.RegisteredSinkNames); 599Assert.Equal(2, _initializedService.RegisteredSinkNames.Count); 602Assert.Empty(_initializedService.LoggerDescriptions); 619Assert.True(_initializedService.RegisterDistributedLogger(regularILogger, description)); 620Assert.False(_initializedService.RegisterDistributedLogger(regularILogger, description)); 623Assert.Equal(2, _initializedService.RegisteredLoggerTypeNames.Count); 624Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger", _initializedService.RegisteredLoggerTypeNames); 625Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames); 628Assert.NotNull(_initializedService.RegisteredSinkNames); 629Assert.Single(_initializedService.RegisteredSinkNames); 630Assert.Single(_initializedService.LoggerDescriptions); 1016_initializedService.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Quiet)); 1017_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.High - 1); 1018_initializedService.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Minimal)); 1019_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.High); 1020_initializedService.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Normal)); 1021_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Normal); 1022_initializedService.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Detailed)); 1023_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Low); 1024_initializedService.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Diagnostic)); 1025_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Low); 1031_initializedService.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Quiet)); 1032_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.High - 1); 1033_initializedService.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Minimal)); 1034_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.High); 1035_initializedService.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Normal)); 1036_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Normal); 1037_initializedService.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Detailed)); 1038_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Low); 1039_initializedService.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Diagnostic)); 1040_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Low); 1072_initializedService.RegisterLogger(new ConsoleLogger(LoggerVerbosity.Normal)); 1073_initializedService.RegisterLogger(new MockLogger() { Verbosity = LoggerVerbosity.Normal }); 1074_initializedService.RegisterLogger(CreateConfigurableForwardingLogger(LoggerVerbosity.Normal)); 1075_initializedService.MinimumRequiredMessageImportance.ShouldBe(MessageImportance.Low); 1116_initializedService.RegisterDistributedLogger(null, centralLoggerDescrption); 1120_initializedService.RegisterLogger(logger); 1125_initializedService.ShutdownComponent();