# CosmosGrainStorage Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosgrainstorage/)

## CosmosGrainStorage(string, CosmosGrainStorageOptions, ILoggerFactory, IServiceProvider, IOptions&lt;ClusterOptions&gt;, IPartitionKeyProvider, IActivatorProvider) {#constructor-string-orleans-persistence-cosmos-cosmosgrainstorageoptions-microsof-62cd9640}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.cosmos/orleans.persistence.cosmos.cosmosgrainstorage/constructors/constructor-string-orleans-persistence-cosmos-cosmosgrainstorageoptions-microsof-62cd9640/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Persistence.Cosmos/CosmosGrainStorage.cs#L28-L46)

```csharp
public CosmosGrainStorage(string name, CosmosGrainStorageOptions options, ILoggerFactory loggerFactory, IServiceProvider serviceProvider, IOptions<ClusterOptions> clusterOptions, IPartitionKeyProvider partitionKeyProvider, IActivatorProvider activatorProvider)
```

### Parameters

- `name` (`string`)
- `options` (`CosmosGrainStorageOptions`)
- `loggerFactory` (`ILoggerFactory`)
- `serviceProvider` (`IServiceProvider`)
- `clusterOptions` (`IOptions<ClusterOptions>`)
- `partitionKeyProvider` (`IPartitionKeyProvider`)
- `activatorProvider` (`IActivatorProvider`)
