Search Results for

    Show / Hide Table of Contents
    View Source

    Class UmbracoContextReference

    Represents a reference to an UmbracoContext instance.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core
    Assembly: Umbraco.Core.dll
    Syntax
    public class UmbracoContextReference : IDisposable
    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, Boolean, IUmbracoContextAccessor)

    Initializes a new instance of the UmbracoContextReference class.

    Declaration
    public UmbracoContextReference(IUmbracoContext umbracoContext, bool isRoot, IUmbracoContextAccessor umbracoContextAccessor)
    Parameters
    Type Name Description
    IUmbracoContext umbracoContext
    System.Boolean 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
    System.Boolean
    View Source

    UmbracoContext

    Gets the UmbracoContext.

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

    Methods

    View Source

    Dispose()

    Declaration
    public void Dispose()
    View Source

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • UmbracoContextReference(IUmbracoContext, Boolean, IUmbracoContextAccessor)
    • Properties
      • IsRoot
      • UmbracoContext
    • Methods
      • Dispose()
      • Dispose(Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX