Updates scopes in execution context to use a Stack so we know which is the top Scope/Context. Fixes disposing things on end request, fixes ensuring orphaned scopes are disposed at end request.

This commit is contained in:
Shannon
2021-03-05 15:27:45 +11:00
parent 7d45a585ee
commit df333ec8cb
13 changed files with 498 additions and 294 deletions

View File

@@ -0,0 +1,18 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using System;
namespace Umbraco.Cms.Core.Scoping
{
/// <summary>
/// Cleans up orphaned <see cref="IScope"/> references at the end of a request
/// </summary>
public interface IHttpScopeReference : IDisposable
{
/// <summary>
/// Register for cleanup in the request
/// </summary>
void Register();
}
}