Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoContextReference

    Represents a reference to an UmbracoContext instance.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core
    Assembly: Umbraco.Core.dll
    Syntax
    public class UmbracoContextReference
    Remarks

    A reference points to an UmbracoContext and it may own it (when it is a root reference) or just reference it. A reference must be disposed after it has been used. Disposing does nothing if the reference is not a root reference. Otherwise, it disposes the UmbracoContext and clears the IUmbracoContextAccessor.

    Constructors

    View Source

    UmbracoContextReference(IUmbracoContext, bool, IUmbracoContextAccessor)

    Initializes a new instance of the UmbracoContextReference class.

    Declaration
    public UmbracoContextReference(IUmbracoContext umbracoContext, bool isRoot, IUmbracoContextAccessor umbracoContextAccessor)
    Parameters
    Type Name Description
    IUmbracoContext umbracoContext
    bool isRoot
    IUmbracoContextAccessor umbracoContextAccessor

    Properties

    View Source

    IsRoot

    Gets a value indicating whether the reference is a root reference.

    Declaration
    public bool IsRoot { get; }
    Property Value
    Type Description
    bool
    View Source

    UmbracoContext

    Gets the UmbracoContext.

    Declaration
    public IUmbracoContext UmbracoContext { get; }
    Property Value
    Type Description
    IUmbracoContext

    Methods

    View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()
    View Source

    Dispose(bool)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX