Search Results for

    Show / Hide Table of Contents
    View Source

    Class ScopeContextualBase

    Provides a base class for scope contextual objects.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Scoping
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public abstract class ScopeContextualBase : IDisposable
    Remarks

    A scope contextual object is enlisted in the current scope context, if any, and released when the context exists. It must be used in a 'using' block, and will be released when disposed, if not part of a scope.

    Methods

    View Source

    Dispose()

    Declaration
    public void Dispose()
    Remarks

    If not scoped, then this releases the contextual object.

    View Source

    Get<T>(ICoreScopeProvider, String, Func<Boolean, T>)

    Gets a contextual object.

    Declaration
    public static T Get<T>(ICoreScopeProvider scopeProvider, string key, Func<bool, T> ctor)
        where T : ScopeContextualBase
    Parameters
    Type Name Description
    ICoreScopeProvider scopeProvider

    A scope provider.

    System.String key

    A context key for the object.

    Func<System.Boolean, T> ctor

    A function producing the contextual object.

    Returns
    Type Description
    T

    The contextual object.

    Type Parameters
    Name Description
    T

    The type of the object.

    Remarks

    View Source

    Get<T>(IScopeProvider, String, Func<Boolean, T>)

    Gets a contextual object.

    Declaration
    public static T Get<T>(IScopeProvider scopeProvider, string key, Func<bool, T> ctor)
        where T : ScopeContextualBase
    Parameters
    Type Name Description
    IScopeProvider scopeProvider

    A scope provider.

    System.String key

    A context key for the object.

    Func<System.Boolean, T> ctor

    A function producing the contextual object.

    Returns
    Type Description
    T

    The contextual object.

    Type Parameters
    Name Description
    T

    The type of the object.

    Remarks

    View Source

    Release(Boolean)

    Releases the contextual object.

    Declaration
    public abstract void Release(bool completed)
    Parameters
    Type Name Description
    System.Boolean completed

    A value indicating whether the scoped operation completed.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX