コード例 #1
0
 public void IsEnabled_Tests(string hostJsonContent, string category, LogLevel logLevel, bool expected)
 {
     try
     {
         FileSystemHelpers.WriteAllTextToFile(_hostJsonFilePath, hostJsonContent);
         var configuration = Utilities.BuildHostJsonConfigutation(_hostOptions);
         LoggingFilterHelper loggingFilterHelper = new LoggingFilterHelper(configuration, false);
         Assert.Equal(expected, loggingFilterHelper.IsEnabled(category, logLevel));
     }
     finally
     {
         DeleteIfExists(_workerDir);
     }
 }
コード例 #2
0
 public bool IsEnabled(LogLevel logLevel)
 {
     return(_loggingFilterHelper.IsEnabled(_category, logLevel));
 }