public static ServiceDescriptor IXmlRepository_S3(S3XmlRepositoryConfiguration configuration) { return(ServiceDescriptor.Singleton <IXmlRepository>(services => new S3XmlRepositoryImpl(services.GetService <AmazonS3Client>(), configuration))); }
public S3XmlRepositoryImpl(IAmazonS3 s3Client, S3XmlRepositoryConfiguration configuration) { _s3Client = s3Client; _configuration = configuration; }
/// <summary> /// Configures the data protection system to persist keys to Amazon S3. /// </summary> /// <param name="builder">The <see cref="IDataProtectionBuilder"/>.</param> /// <param name="configuration">The configuration item.</param> /// <returns>A reference to the <see cref="IDataProtectionBuilder" /> after this operation has completed.</returns> public static IDataProtectionBuilder PersistKeysToS3(this IDataProtectionBuilder builder, S3XmlRepositoryConfiguration configuration) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } Use(builder.Services, IXmlRepository_S3(configuration)); return(builder); }