ServiceCollectionExtensions
Extension methods for adding and configuring the Azure Cosmos DB services when running on ASP.NET CORE.
Namespace: Microsoft.Azure.CosmosRepository.AspNetCore.Extensions
Kind: class
Extension methods for adding and configuring the Azure Cosmos DB services when running on ASP.NET CORE.
public static class ServiceCollectionExtensionsExample
Members
Methods
ServiceCollectionExtensions.AddCosmosRepositoryChangeFeedHostedService(IServiceCollection)
Adds the hosted service to process changes from any number of cosmos containers.
public static IServiceCollection AddCosmosRepositoryChangeFeedHostedService(this IServiceCollection services)Parameters
| Name | Type | Description |
|---|---|---|
services | IServiceCollection | The service collection to add services to. |
Returns — IServiceCollection: The same service collection that was provided, with the CosmosRepositoryChangeFeedHostedService
Please ensure this is called in conjunction with services.AddCosmosRepository(…)
ServiceCollectionExtensions.AddCosmosRepositoryItemChangeFeedProcessors(IServiceCollection, params Assembly[])
Adds the given IItemChangeFeedProcessor defined in the given assemblies.
public static IServiceCollection AddCosmosRepositoryItemChangeFeedProcessors(this IServiceCollection services, params Assembly[] assemblies)Parameters
| Name | Type | Description |
|---|---|---|
services | IServiceCollection | The service collection to add services to. |
assemblies | Assembly[] | The assemblies to scan for IItemChangeFeedProcessor’s. |
Returns — IServiceCollection: The same service collection that was provided, with the found IItemChangeFeedProcessor’s registered as singletons.