Class MethodCommonServiceCollectionExtensions
Inheritance
System.Object
MethodCommonServiceCollectionExtensions
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: Copper.Conventions.Method.Common.dll
Syntax
public static class MethodCommonServiceCollectionExtensions
Methods
View SourceTryAddDistributedCache(IServiceCollection, IConfiguration)
Adds an serviceCollection
if the service type hasn't already been registered.
Declaration
public static IServiceCollection TryAddDistributedCache(this IServiceCollection serviceCollection, IConfiguration configuration)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | serviceCollection | The service collection. |
IConfiguration | configuration | The configuration used to determine whether to use the in-memory or local file implementation of |
Returns
Type | Description |
---|---|
IServiceCollection |
Remarks
The boolean that determines whether to use local file implementation must be configured under UseLocalFileDistributedCacheConfigurationEntry.