/// <summary> /// Disposes all the components resolved in the current scope. /// </summary> public void Dispose() { if (!_isDisposed) { _isDisposed = true; Current = _priorContext; this.Disposed(this, new EventArgs()); } }
private UnitOfWorkScope() { this.Disposed += (sender, ev) => { }; _priorContext = Current; Current = this; }