public static IXabarilBuilder AddXabaril(this IServiceCollection serviceCollection) { var builder = new XabarilBuilder(serviceCollection); builder.Services.TryAdd(new ServiceCollection() .AddOutOfBoxServices()); return(builder); }
public void configure_required_services() { var serviceCollection = new ServiceCollection(); serviceCollection.AddLogging(); IXabarilBuilder xabarilBuilder = new XabarilBuilder(serviceCollection); xabarilBuilder = xabarilBuilder.AddXabarilInMemoryStore(); var serviceProvider = serviceCollection.BuildServiceProvider(); serviceProvider .GetRequiredService <IFeaturesStore>() .Should().NotBeNull(); serviceProvider .GetRequiredService <IFeaturesStore>() .Should().BeOfType <InMemoryFeaturesStore>(); }
public void configure_required_services() { var serviceCollection = new ServiceCollection(); serviceCollection.AddLogging(); var builder = new XabarilBuilder(serviceCollection); builder.AddRedisStore(); var serviceProvider = builder.Services.BuildServiceProvider(); serviceProvider .GetRequiredService <IFeaturesStore>() .Should().NotBeNull(); serviceProvider .GetRequiredService <IFeaturesStore>() .Should().BeOfType <RedisFeaturesStore>(); }