コード例 #1
0
        public void DefaultPageOptions_HasDefaultPath()
        {
            // Arrange & act
            var options = new ElmOptions();

            // Assert
            Assert.Equal(DefaultPath, options.Path.Value);
        }
コード例 #2
0
        private Tuple<ElmLogger, ElmStore> SetUp(Func<string, LogLevel, bool> filter = null, string name = null)
        {
            // Arrange
            var store = new ElmStore();
            var options = new ElmOptions() { Filter = filter ?? _filter };
            var provider = new ElmLoggerProvider(store, options);
            var logger = (ElmLogger)provider.CreateLogger(name ?? _name);

            return new Tuple<ElmLogger, ElmStore>(logger, store);
        }
コード例 #3
0
        public ElmLoggerProvider(ElmStore store, ElmOptions options)
        {
            if (store == null)
            {
                throw new ArgumentNullException(nameof(store));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _store   = store;
            _options = options;
        }
コード例 #4
0
        public ElmLoggerProvider(ElmStore store, ElmOptions options)
        {
            if (store == null)
            {
                throw new ArgumentNullException(nameof(store));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _store = store;
            _options = options;
        }
コード例 #5
0
 public ElmCaptureMiddleware(RequestDelegate next, ILoggerFactory factory, IOptions <ElmOptions> options)
 {
     _next    = next;
     _options = options.Options;
     _logger  = factory.Create <ElmCaptureMiddleware>();
 }
コード例 #6
0
 public ElmPageMiddleware(RequestDelegate next, IOptions <ElmOptions> options, ElmStore store)
 {
     _next    = next;
     _options = options.Value;
     _store   = store;
 }
コード例 #7
0
 public ElmCaptureMiddleware(RequestDelegate next, ILoggerFactory factory, IOptions<ElmOptions> options)
 {
     _next = next;
     _options = options.Options;
     _logger = factory.CreateLogger<ElmCaptureMiddleware>();
 }
コード例 #8
0
 public ElmPageMiddleware(RequestDelegate next, IOptions<ElmOptions> options, ElmStore store)
 {
     _next = next;
     _options = options.Value;
     _store = store;
 }
コード例 #9
0
 public ElmLogger(string name, ElmOptions options, ElmStore store)
 {
     _name    = name;
     _options = options;
     _store   = store;
 }
コード例 #10
0
 public ElmLogger(string name, ElmOptions options, ElmStore store)
 {
     _name = name;
     _options = options;
     _store = store;
 }
コード例 #11
0
 public ElmLoggerProvider([NotNull] ElmStore store, [NotNull] ElmOptions options)
 {
     _store   = store;
     _options = options;
 }
コード例 #12
0
 public ElmLoggerProvider([NotNull] ElmStore store, [NotNull] ElmOptions options)
 {
     _store = store;
     _options = options;
 }