private Container BuildCosmosContainer(CosmosDbGrainStorageOptions options)
        {
            var client = new CosmosClient(options.AccountEndpoint, options.AccountKey, options.CosmosClientOptions);
            var db     = client.GetDatabase(options.DatabaseId);

            return(db.GetContainer(options.ContainerId));
        }
        public CosmosDbGrainStorage(string storageName, CosmosDbGrainStorageOptions options, IOptions <ClusterOptions> clusterOptions, IGrainFactory grainFactory, ITypeResolver typeResolver)
        {
            this.storageName = storageName;

            this.options        = options;
            this.clusterOptions = clusterOptions.Value;
            this.grainFactory   = grainFactory;
            this.typeResolver   = typeResolver;

            this.container = BuildCosmosContainer(options);
        }