Search Results for

    Show / Hide Table of Contents
    View Source

    Class LazyResolve<T>

    Provides lazy resolution of a service from the dependency injection container.

    Inheritance
    object
    Lazy<T>
    Namespace: Umbraco.Cms.Core.Composing
    Assembly: Umbraco.Core.dll
    Syntax
    public class LazyResolve<T> : Lazy<T> where T : class
    Type Parameters
    Name Description
    T

    The type of service to resolve.

    Remarks

    This class defers service resolution until the System.Lazy<T>.Value property is accessed, which can help avoid circular dependency issues during application startup.

    Constructors

    View Source

    LazyResolve(IServiceProvider)

    Initializes a new instance of the LazyResolve<T> class.

    Declaration
    public LazyResolve(IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    IServiceProvider serviceProvider

    The service provider used to resolve the service.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX