protected virtual void OnTeardown() { foreach (var item in Items) { var disposable = item as IDisposable; if (disposable != null) { disposable.Dispose(); } } ItemsCore.Clear(); }
/// <summary> /// Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1" />. /// </summary> public virtual void Clear() { ItemsCore.Clear(); }