using System;
namespace Chernobyl.Event
{
///
/// An interface for working with types that can block invocation of events
/// from passing threw them based on some predicate. To use, just assign
/// to the event that could be blocked and then assign
/// the other event handlers to .
///
/// The type that is
/// generated from the invocation of the event that may be blocked.
public interface IEventPredicate where TEventArgs : EventArgs
{
///
/// An event handler that can be assigned to an event. This method will
/// invoke if the internal predicate is true. If it
/// is false, the event will not be invoked. If
/// is invoked, will be passed
/// through .
///
/// The instance that generated the event.
/// The instance
/// containing the event data.
void Enter(object sender, TEventArgs e);
///
/// The event that will be invoked if the
/// is invoked and the internal
/// predicate resolves to true. The
/// instance that is passed along with this event is the same
/// that was passed to
/// .
///
event EventHandler Exit;
}
}