You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noted in #19 (comment), IsDisposable gets replaced with Dispose:
public class MiddlewareResolverResult
{
- /// <summary>- /// Gets or sets the value indicating whether the middleware should be disposed.- /// Set this to <see langword="true"/> if the middleware is IDisposable or- /// IAsyncDisposable (requires .NET Standard 2.1 or greater)- /// and is not disposed by a dependency injection container.- /// </summary>- public bool IsDisposable { get; set; }+ /// <summary>+ /// Gets or sets the value indicating whether the middleware should be disposed.+ /// Set this to <see langword="true"/> if the middleware is not disposed+ /// by a dependency injection container.+ /// </summary>+ public bool Dispose { get; set; }
}
and it is no longer needed to check if middleware implements IDisposable/IAsyncDisposable in IMiddlewareResolver implementations.
And I refactored stuff for readability and less code duplication.
The text was updated successfully, but these errors were encountered:
mariusz96
changed the title
Replace MiddlewareResult.IsDisposable with MiddlewareResult.Dispose + Refactor
Replace IsDisposable with Dispose + Refactor
Oct 26, 2024
As noted in #19 (comment),
IsDisposable
gets replaced withDispose
:and it is no longer needed to check if middleware implements
IDisposable
/IAsyncDisposable
inIMiddlewareResolver
implementations.And I refactored stuff for readability and less code duplication.
The text was updated successfully, but these errors were encountered: