public void Dispose(Authentication authentication, bool isCanceled) { this.dispatcher.VerifyAccess(); var container = this.Container; this.dispatcher.Dispose(); this.dispatcher = null; this.domainLogger?.Dispose(true); this.domainLogger = null; this.Dispose(); this.OnDeleted(new DomainDeletedEventArgs(authentication, this, isCanceled)); container.InvokeDomainDeletedEvent(authentication, this, isCanceled); }
public void Dispose(DomainContext domainContext) { try { this.dispatcher.VerifyAccess(); this.dispatcher.Dispose(); this.dispatcher = null; this.domainLogger?.Dispose(false); this.domainLogger = null; this.Dispose(); } catch (Exception e) { this.CremaHost.Error(e); throw; } }
public void Delete(Authentication authentication, bool isCanceled) { this.dispatcher.VerifyAccess(); this.CremaHost.DebugMethod(authentication, this, nameof(Delete), base.DomainInfo.ItemPath, base.DomainInfo.ItemType, isCanceled); this.ValidateDelete(authentication, isCanceled); this.Sign(authentication, true); var container = this.Container; this.dispatcher.Dispose(); this.dispatcher = null; this.domainLogger?.Dispose(true); this.domainLogger = null; this.users.Clear(); this.Dispose(); this.OnDeleted(new DomainDeletedEventArgs(authentication, this, isCanceled)); container.InvokeDomainDeletedEvent(authentication, this, isCanceled); }
public void Dispose(bool disposing) { this.dispatcher.VerifyAccess(); var container = this.Container; this.dispatcher.Dispose(); this.dispatcher = null; this.domainLogger?.Dispose(false); this.domainLogger = null; this.Dispose(); if (disposing == false) { container.InvokeDomainDeletedEvent(Authentication.System, this, false); } }