Files
Umbraco-CMS/src/Umbraco.Infrastructure/Scoping/LegacyIScopeProvider.cs
Paul Johnson 8c7905a354 merge release/10.0.0 into v10/dev
commit 9ff06eec6e
Author: Ronald Barendse <ronald@barend.se>
Date:   Wed May 25 11:16:39 2022 +0200

    v10: Instantly reload ConnectionStrings after saving configuration (#12475)

    * Do not replace DataDirectory placeholder when setting connection string

    * Ensure ConnectionStrings options are updated when configuration is reloaded

    * Use CurrentValue to get default Umbraco connection string

commit fcee6dc06a
Author: Paul Johnson <pmj@umbraco.com>
Date:   Wed May 25 10:08:43 2022 +0100

    Fix legacy scope provider no longer implementing ICoreScopeProvider (#12480)

commit 88f3628d0a
Author: Paul Johnson <pmj@umbraco.com>
Date:   Wed May 25 09:49:33 2022 +0100

    Fix options monitor setup for connectionstrings (#12472)

commit 4eeb03e7fb
Author: Johan Runsten <jrunestone@users.noreply.github.com>
Date:   Wed May 25 10:13:25 2022 +0200

    Fixed null check typo in CacheInstructionService. Fixes #12473. (#12474)

    * Fixed null check typo. Fixes #12473.

    * Removed unneccessary null forgiving operator

    Co-authored-by: Johan Runsten <johan.runsten@toxic.se>

commit d810d66e9a
Author: Asbjørn Riis-Knudsen <ar@jf-data.com>
Date:   Tue May 24 17:41:10 2022 +0200

    Fix #12454 by having Coalesce handle null values (#12456)

    * Fix #12454 by having Coalesce handle null values

    * Allow null values in Html.Coalesce #12454

commit 963d4c5051
Author: Paul Johnson <pmj@umbraco.com>
Date:   Tue May 24 13:55:39 2022 +0100

    Ensure unique buildnumber for devops UI
2022-05-25 10:48:45 +01:00

91 lines
4.2 KiB
C#

using System.Data;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Infrastructure.Persistence;
// ReSharper disable once CheckNamespace
namespace Umbraco.Cms.Core.Scoping;
[Obsolete("Please use Umbraco.Cms.Infrastructure.Scoping.IScopeProvider or Umbraco.Cms.Core.Scoping.ICoreScopeProvider instead.")]
public interface IScopeProvider : ICoreScopeProvider
{
/// <summary>
/// Creates an ambient scope.
/// </summary>
/// <param name="isolationLevel">The transaction isolation level.</param>
/// <param name="repositoryCacheMode">The repositories cache mode.</param>
/// <param name="eventDispatcher">An optional events dispatcher.</param>
/// <param name="scopedNotificationPublisher">An optional notification publisher.</param>
/// <param name="scopeFileSystems">A value indicating whether to scope the filesystems.</param>
/// <param name="callContext">A value indicating whether this scope should always be registered in the call context.</param>
/// <param name="autoComplete">A value indicating whether this scope is auto-completed.</param>
/// <returns>The created ambient scope.</returns>
/// <remarks>
/// <para>The created scope becomes the ambient scope.</para>
/// <para>If an ambient scope already exists, it becomes the parent of the created scope.</para>
/// <para>When the created scope is disposed, the parent scope becomes the ambient scope again.</para>
/// <para>Parameters must be specified on the outermost scope, or must be compatible with the parents.</para>
/// <para>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.</para>
/// </remarks>
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);
/// <summary>
/// Creates a detached scope.
/// </summary>
/// <returns>A detached scope.</returns>
/// <param name="isolationLevel">The transaction isolation level.</param>
/// <param name="repositoryCacheMode">The repositories cache mode.</param>
/// <param name="eventDispatcher">An optional events dispatcher.</param>
/// <param name="scopedNotificationPublisher">An option notification publisher.</param>
/// <param name="scopeFileSystems">A value indicating whether to scope the filesystems.</param>
/// <remarks>
/// <para>A detached scope is not ambient and has no parent.</para>
/// <para>It is meant to be attached by <see cref="AttachScope"/>.</para>
/// </remarks>
/// <remarks>
/// This is not used by CMS but is used by Umbraco Deploy.
/// </remarks>
IScope CreateDetachedScope(
IsolationLevel isolationLevel = IsolationLevel.Unspecified,
RepositoryCacheMode repositoryCacheMode = RepositoryCacheMode.Unspecified,
IEventDispatcher? eventDispatcher = null,
IScopedNotificationPublisher? scopedNotificationPublisher = null,
bool? scopeFileSystems = null);
/// <summary>
/// Attaches a scope.
/// </summary>
/// <param name="scope">The scope to attach.</param>
/// <param name="callContext">A value indicating whether to force usage of call context.</param>
/// <remarks>
/// <para>Only a scope created by <see cref="CreateDetachedScope"/> can be attached.</para>
/// </remarks>
void AttachScope(IScope scope, bool callContext = false);
/// <summary>
/// Detaches a scope.
/// </summary>
/// <returns>The detached scope.</returns>
/// <remarks>
/// <para>Only a scope previously attached by <see cref="AttachScope"/> can be detached.</para>
/// </remarks>
IScope DetachScope();
/// <summary>
/// Gets the scope context.
/// </summary>
IScopeContext? Context { get; }
/// <summary>
/// Gets the sql context.
/// </summary>
ISqlContext SqlContext { get; }
}