コード例 #1
0
        protected virtual void OnTeardown()
        {
            foreach (var item in Items)
            {
                var disposable = item as IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }

            ItemsCore.Clear();
        }
コード例 #2
0
 /// <summary>
 ///     Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1" />.
 /// </summary>
 public virtual void Clear()
 {
     ItemsCore.Clear();
 }