Search Results for

    Show / Hide Table of Contents

    Class ServiceCollectionExtensions

    Inheritance
    object
    ServiceCollectionExtensions
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.API.Core.Reflection
    Assembly: LemonEdge.API.Core.dll
    Syntax
    public static class ServiceCollectionExtensions

    Methods

    AddAutoFactory<TFactory>(IServiceCollection)

    Creates a proxy to a factory interface to auto-resolve parameters in construction that aren't defined in the factory. WARNING: The return type MUST be a concrete type.

    Declaration
    public static IServiceCollection AddAutoFactory<TFactory>(this IServiceCollection services) where TFactory : class
    Parameters
    Type Name Description
    IServiceCollection services

    The service collection.

    Returns
    Type Description
    IServiceCollection

    The service collection.

    Type Parameters
    Name Description
    TFactory

    The interface.

    Examples

    Specifying: IControlCommandFactory { public EPCommand Create(IModelLayoutCommon modelLayoutCommon); } Creates an EPCommand using the constructor starting with IModelLayoutCommon and auto-resolving any others.

    In this article
    Back to top © LemonEdge Technologies. All rights reserved.