Show / Hide Table of Contents

    Class MethodCommonServiceCollectionExtensions

    extensions.

    Inheritance
    System.Object
    MethodCommonServiceCollectionExtensions
    Namespace: Microsoft.Extensions.DependencyInjection
    Assembly: Copper.Conventions.Method.Common.dll
    Syntax
    public static class MethodCommonServiceCollectionExtensions

    Methods

    View Source

    TryAddDistributedCache(IServiceCollection, IConfiguration)

    Adds an implementation as a service to the 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.

    • View Source
    Back to top Generated by DocFX