Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IScopeProvider

    Provides scopes.

    Namespace: Umbraco.Cms.Infrastructure.Scoping
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public interface IScopeProvider : ICoreScopeProvider

    Properties

    View Source

    SqlContext

    Gets the sql context.

    Declaration
    ISqlContext SqlContext { get; }
    Property Value
    Type Description
    ISqlContext

    Methods

    View Source

    AttachScope(IScope, Boolean)

    Attaches a scope.

    Declaration
    void AttachScope(IScope scope, bool callContext = false)
    Parameters
    Type Name Description
    IScope scope

    The scope to attach.

    System.Boolean callContext

    A value indicating whether to force usage of call context.

    Remarks

    Only a scope created by CreateDetachedScope(IsolationLevel, RepositoryCacheMode, IEventDispatcher, IScopedNotificationPublisher, Nullable<Boolean>) can be attached.

    View Source

    CreateDetachedScope(IsolationLevel, RepositoryCacheMode, IEventDispatcher, IScopedNotificationPublisher, Nullable<Boolean>)

    Creates a detached scope.

    Declaration
    IScope CreateDetachedScope(IsolationLevel isolationLevel = IsolationLevel.Unspecified, RepositoryCacheMode repositoryCacheMode = RepositoryCacheMode.Unspecified, IEventDispatcher eventDispatcher = null, IScopedNotificationPublisher scopedNotificationPublisher = null, bool? scopeFileSystems = null)
    Parameters
    Type Name Description
    System.Data.IsolationLevel isolationLevel

    The transaction isolation level.

    RepositoryCacheMode repositoryCacheMode

    The repositories cache mode.

    IEventDispatcher eventDispatcher

    An optional events dispatcher.

    IScopedNotificationPublisher scopedNotificationPublisher

    An option notification publisher.

    System.Nullable<System.Boolean> scopeFileSystems

    A value indicating whether to scope the filesystems.

    Returns
    Type Description
    IScope

    A detached scope.

    Remarks

    A detached scope is not ambient and has no parent.

    It is meant to be attached by AttachScope(IScope, Boolean).

    View Source

    CreateScope(IsolationLevel, RepositoryCacheMode, IEventDispatcher, IScopedNotificationPublisher, Nullable<Boolean>, Boolean, Boolean)

    Creates an ambient scope.

    Declaration
    IScope CreateScope(IsolationLevel isolationLevel = IsolationLevel.Unspecified, RepositoryCacheMode repositoryCacheMode = RepositoryCacheMode.Unspecified, IEventDispatcher eventDispatcher = null, IScopedNotificationPublisher scopedNotificationPublisher = null, bool? scopeFileSystems = null, bool callContext = false, bool autoComplete = false)
    Parameters
    Type Name Description
    System.Data.IsolationLevel isolationLevel

    The transaction isolation level.

    RepositoryCacheMode repositoryCacheMode

    The repositories cache mode.

    IEventDispatcher eventDispatcher

    An optional events dispatcher.

    IScopedNotificationPublisher scopedNotificationPublisher

    An optional notification publisher.

    System.Nullable<System.Boolean> scopeFileSystems

    A value indicating whether to scope the filesystems.

    System.Boolean callContext

    A value indicating whether this scope should always be registered in the call context.

    System.Boolean autoComplete

    A value indicating whether this scope is auto-completed.

    Returns
    Type Description
    IScope

    The created ambient scope.

    Remarks

    The created scope becomes the ambient scope.

    If an ambient scope already exists, it becomes the parent of the created scope.

    When the created scope is disposed, the parent scope becomes the ambient scope again.

    Parameters must be specified on the outermost scope, or must be compatible with the parents.

    Auto-completed scopes should be used for read-only operations ONLY. Do not use them if you do not understand the associated issues, such as the scope being completed even though an exception is thrown.

    View Source

    DetachScope()

    Detaches a scope.

    Declaration
    IScope DetachScope()
    Returns
    Type Description
    IScope

    The detached scope.

    Remarks

    Only a scope previously attached by AttachScope(IScope, Boolean) can be detached.

    Explicit Interface Implementations

    View Source

    ICoreScopeProvider.CreateCoreScope(IsolationLevel, RepositoryCacheMode, IEventDispatcher, IScopedNotificationPublisher, Nullable<Boolean>, Boolean, Boolean)

    Creates an ambient scope.

    Declaration
    ICoreScope ICoreScopeProvider.CreateCoreScope(IsolationLevel isolationLevel, RepositoryCacheMode repositoryCacheMode, IEventDispatcher eventDispatcher, IScopedNotificationPublisher scopedNotificationPublisher, bool? scopeFileSystems, bool callContext, bool autoComplete)
    Parameters
    Type Name Description
    System.Data.IsolationLevel isolationLevel

    The transaction isolation level.

    RepositoryCacheMode repositoryCacheMode

    The repositories cache mode.

    IEventDispatcher eventDispatcher

    An optional events dispatcher.

    IScopedNotificationPublisher scopedNotificationPublisher

    An optional notification publisher.

    System.Nullable<System.Boolean> scopeFileSystems

    A value indicating whether to scope the filesystems.

    System.Boolean callContext

    A value indicating whether this scope should always be registered in the call context.

    System.Boolean autoComplete

    A value indicating whether this scope is auto-completed.

    Returns
    Type Description
    ICoreScope

    The created ambient scope.

    Remarks

    The created scope becomes the ambient scope.

    If an ambient scope already exists, it becomes the parent of the created scope.

    When the created scope is disposed, the parent scope becomes the ambient scope again.

    Parameters must be specified on the outermost scope, or must be compatible with the parents.

    Auto-completed scopes should be used for read-only operations ONLY. Do not use them if you do not understand the associated issues, such as the scope being completed even though an exception is thrown.

    View Source

    ICoreScopeProvider.CreateQuery<T>()

    Creates an instance of IQuery<T>

    Declaration
    IQuery<T> ICoreScopeProvider.CreateQuery<T>()
    Returns
    Type Description
    IQuery<T>
    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • SqlContext
    • Methods
      • AttachScope(IScope, Boolean)
      • CreateDetachedScope(IsolationLevel, RepositoryCacheMode, IEventDispatcher, IScopedNotificationPublisher, Nullable<Boolean>)
      • CreateScope(IsolationLevel, RepositoryCacheMode, IEventDispatcher, IScopedNotificationPublisher, Nullable<Boolean>, Boolean, Boolean)
      • DetachScope()
    • Explicit Interface Implementations
      • ICoreScopeProvider.CreateCoreScope(IsolationLevel, RepositoryCacheMode, IEventDispatcher, IScopedNotificationPublisher, Nullable<Boolean>, Boolean, Boolean)
      • ICoreScopeProvider.CreateQuery<T>()
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX