public static IServiceCollection ConfigureGoogleCloudStorageProvider(this IServiceCollection services, string projectId, Action <GoogleCloudStorageOptionsBuilder> configure = null) { var builder = new GoogleCloudStorageOptionsBuilder(projectId); configure?.Invoke(builder); return(services .AddSingleton(builder) .AddSingleton <GoogleCloudStorageOptions>()); }
public GoogleCloudStorageOptions(GoogleCloudStorageOptionsBuilder builder) { ProjectId = builder.ProjectId; ChunkSize = builder.ChunkSize; PredefinedAcl = builder.PredefinedAcl; DefaultMetadata = builder.DefaultMetadata.ToImmutable(); DefaultCacheControl = builder.DefaultCacheControl; DefaultContentDisposition = builder.DefaultContentDisposition; DefaultContentEncoding = builder.DefaultContentEncoding; DefaultContentLanguage = builder.DefaultContentLanguage; }