protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
public void Dispose() { Primary?.Dispose(); if (Secondaries != null) { foreach (var secondary in Secondaries) { secondary?.Dispose(); } Secondaries = null; } }
protected override void Dispose(bool disposing) { if (disposing) { Primary.Dispose(); if (AutoClose) { try { Secondary.Dispose(); } catch (Exception ex) { throw new TeeException(ex); } } } }
public void Dispose() { Primary?.Dispose(); Secondary?.Dispose(); }