예제 #1
0
        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));
        }
예제 #2
0
        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));
        }
예제 #3
0
 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;
 }