using System; using System.Collections.Generic; using Chernobyl.Event; namespace Chernobyl.Collections.Generic.Event { /// /// An type that extends an /// using the decorator pattern /// (http://en.wikipedia.org/wiki/Decorator_pattern) by giving it add and /// removal events. /// /// The type that is to be held within this /// . public class DecoratingEventCollection : EventCollection { /// /// Initializes a new instance of the /// class. /// /// The /// being decorated or extended with event capabilities. public DecoratingEventCollection(ICollection collectionDecorated) { _collectionDecorated = collectionDecorated; } /// /// The being decorated or extended with /// event capabilities. /// protected override ICollection CollectionDecorated { get { return _collectionDecorated; } } /// /// The backing field to . /// readonly ICollection _collectionDecorated; } }