|
namespace JpLabs.TweakedEvents
{
internal sealed class StrongEvent<TEH> : TweakedEvent<TEH> where TEH : class
{
// Static methods / members
public static readonly TweakedEvent<TEH> Empty = new StrongEvent<TEH>();
// Constructors
private StrongEvent()
{}
internal StrongEvent(IEventEntry<TEH>[] entries) : base(entries)
{}
// Overridden methods
protected override ITweakedEvent<TEH> CreateNew(IEventEntry<TEH>[] entries)
{
//Empty StrongEvents are converted to {null}
if (entries == null || entries.Length == 0) return null;
return new StrongEvent<TEH>(entries);
}
public override IEventEntry<TEH> CreateEntry(TEH handler)
{
return new StrongEventEntry<TEH>(handler);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.