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>(); }
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); }