Beispiel #1
0
        public static void AddFileStore(this HttpLoggingBuilder builder, Action <FileStoreOptions> configureOptions)
        {
            var services = builder.Services;

            builder.AddStore <FileStore>(ServiceLifetime.Singleton);

            services.Configure(configureOptions);

            services.AddSingleton <IFileSystem, FileSystem>();
        }
Beispiel #2
0
        public static void AddElasticSearchStore(this HttpLoggingBuilder builder, Action <ElasticSearchStoreOptions> configureOptions)
        {
            var services = builder.Services;

            services.AddSingleton <IElasticsearchSerializer, ElasticSearchSerializer>();

            builder.AddStore <ElasticSearchStore>(ServiceLifetime.Singleton);

            services.Configure(configureOptions);
        }