public static DynamicCacheServiceBuilder <TKey, TAggregate> AddDynamicCacheService <TKey, TAggregate>(this IServiceCollection services, Action <DynamicCacheServiceBuilderOptions> cacheServiceConfiguration) where TAggregate : class, IAggregate <TKey>, new() { var options = new DynamicCacheServiceBuilderOptions(services); cacheServiceConfiguration(options); var builder = new DynamicCacheServiceBuilder <TKey, TAggregate>(options); builder.Initialize(); return(builder); }
public DynamicCacheServiceBuilder(DynamicCacheServiceBuilderOptions options) { Options = options; }