public void Dispose() { lock (_childs) { foreach (var child in _childs.ToList()) { child.Dispose(); } _childs.Clear(); } _container.Dispose(); _parent?.ChildDisposed(this); }
public void Dispose() { lock (_childs) { foreach (var child in _childs.ToList()) { child.Dispose(); } _childs.Clear(); } _container.Dispose(); _parent?.ChildDisposed(this); }