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:
18
src/Umbraco.Infrastructure/Scoping/IHttpScopeReference.cs
Normal file
18
src/Umbraco.Infrastructure/Scoping/IHttpScopeReference.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user