public DistributedDataXmlRepository(IDistributedCache cache, DistributedDataXmlRepositoryOptions options) { this.cache = cache; this.options = options; }
public static IDataProtectionBuilder PersistKeysToDistributedCache(this IDataProtectionBuilder builder, DistributedDataXmlRepositoryOptions options = null) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } builder.Services.TryAddSingleton <IXmlRepository>(services => new DistributedDataXmlRepository(services.GetRequiredService <IDistributedCache>(), options ?? new DistributedDataXmlRepositoryOptions())); return(builder); }