private static IServiceCollection AddPersistedStoreRepository( this IServiceCollection services, Action <PersistedStoreOptions> storeOptionsAction = null) { var storeOptions = new PersistedStoreOptions(); storeOptionsAction?.Invoke(storeOptions); services.AddSingleton(storeOptions); services.AddSingleton <PersistedGrantStoreCacheHandle>( new PersistedGrantStoreCacheHandle(storeOptions)); services.AddSingleton <IPersistedGrantStoreRepository, PersistedGrantStoreRepository>(); return(services); }
public PersistedGrantStoreCacheHandle( PersistedStoreOptions options) { this.options = options; cache = Utilities.CreateCache(options); }