internal static IGrainStorage Create(IServiceProvider services, string name) { IOptionsSnapshot <MinioGrainStorageOptions> optionsSnapshot = services.GetRequiredService <IOptionsSnapshot <MinioGrainStorageOptions> >(); var options = optionsSnapshot.Get(name); IMinioStorage storage = ActivatorUtilities.CreateInstance <MinioStorage>(services, options.AccessKey, options.SecretKey, options.Endpoint); return(ActivatorUtilities.CreateInstance <MinioGrainStorage>(services, name, options.Container, storage)); }
public static IGrainStorage Create(IServiceProvider services, string name) { var optionsSnapshot = services.GetRequiredService <IOptionsSnapshot <MinioGrainStorageOptions> >(); var options = optionsSnapshot.Get(name); IMinioStorage storage = ActivatorUtilities.CreateInstance <MinioStorage>(services, options); return(ActivatorUtilities.CreateInstance <MinioGrainStorage>(services, name, options.Container, storage)); }
public MinioGrainStorage(string name, string container, IMinioStorage storage, ILogger <MinioGrainStorage> logger, IGrainFactory grainFactory, ITypeResolver typeResolver) { _name = name; _container = container; _logger = logger; _storage = storage; _grainFactory = grainFactory; _typeResolver = typeResolver; }