public void Dispose() { var disposeShellContext = ScopeReleased(); _httpContext.RequestServices = _existingServices; _serviceScope.Dispose(); GC.SuppressFinalize(this); if (disposeShellContext) { _shellContext.Dispose(); } }
public void Dispose() { var disposeShellContext = ScopeReleased(); _httpContext.RequestServices = _existingServices; _serviceScope.Dispose(); if (disposeShellContext) { _shellContext.Dispose(); } // Decrement the counter at the very end of the scope Interlocked.Decrement(ref _shellContext._refCount); }