# HostingExtensions

Package: [Microsoft.Orleans.Clustering.Cosmos](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/) 10.0.0

[NuGet package](https://www.nuget.org/packages/Microsoft.Orleans.Clustering.Cosmos) | [Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Clustering.Cosmos/HostingExtensions.cs#L10)

```csharp
public static class HostingExtensions
```

Extension methods for configuring Azure Cosmos DB clustering.

## Methods

- [UseCosmosClustering(IServiceCollection, Action&lt;CosmosClusteringOptions&gt;)](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/orleans.hosting.hostingextensions/methods/usecosmosclustering-this-microsoft-extensions-dependencyinjection-iservicecollec-df00f5c8/)
- [UseCosmosClustering(IServiceCollection, Action&lt;OptionsBuilder&lt;CosmosClusteringOptions&gt;&gt;)](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/orleans.hosting.hostingextensions/methods/usecosmosclustering-this-microsoft-extensions-dependencyinjection-iservicecollec-3b9566b3/)
- [UseCosmosClustering(ISiloBuilder)](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/orleans.hosting.hostingextensions/methods/usecosmosclustering-this-orleans-hosting-isilobuilder-51673f75/)
- [UseCosmosClustering(ISiloBuilder, Action&lt;CosmosClusteringOptions&gt;)](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/orleans.hosting.hostingextensions/methods/usecosmosclustering-this-orleans-hosting-isilobuilder-system-action-orleans-clus-2ecf3afb/)
- [UseCosmosClustering(ISiloBuilder, Action&lt;OptionsBuilder&lt;CosmosClusteringOptions&gt;&gt;)](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/orleans.hosting.hostingextensions/methods/usecosmosclustering-this-orleans-hosting-isilobuilder-system-action-microsoft-ex-5764edc4/)
- [UseCosmosGatewayListProvider(IClientBuilder)](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/orleans.hosting.hostingextensions/methods/usecosmosgatewaylistprovider-this-orleans-hosting-iclientbuilder-efcdd6ea/)
- [UseCosmosGatewayListProvider(IClientBuilder, Action&lt;CosmosClusteringOptions&gt;)](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/orleans.hosting.hostingextensions/methods/usecosmosgatewaylistprovider-this-orleans-hosting-iclientbuilder-system-action-o-eb4f6704/)
- [UseCosmosGatewayListProvider(IClientBuilder, Action&lt;OptionsBuilder&lt;CosmosClusteringOptions&gt;&gt;)](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/orleans.hosting.hostingextensions/methods/usecosmosgatewaylistprovider-this-orleans-hosting-iclientbuilder-system-action-m-0eb9153f/)
- [UseCosmosGatewayListProvider(IServiceCollection, Action&lt;CosmosClusteringOptions&gt;)](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/orleans.hosting.hostingextensions/methods/usecosmosgatewaylistprovider-this-microsoft-extensions-dependencyinjection-iserv-59af3ba3/)
- [UseCosmosGatewayListProvider(IServiceCollection, Action&lt;OptionsBuilder&lt;CosmosClusteringOptions&gt;&gt;)](/orleans/docs/api/csharp/microsoft.orleans.clustering.cosmos/orleans.hosting.hostingextensions/methods/usecosmosgatewaylistprovider-this-microsoft-extensions-dependencyinjection-iserv-83c76eac/)
