/// <summary> /// Constructor /// </summary> /// <param name="msg"></param> /// <param name="callback"></param> public BooleanSet(string msg, EventCallback <RealmEventArgs> callback) { _callback = callback; _set = new Dictionary <string, bool>(); _table = new EventTable { { "message", msg } }; }
/// <summary> /// Initializes a new instance of the class with the given type and event table /// </summary> public RealmEventArgs(string type, EventTable table) { Validation.IsNotNullOrEmpty(type, "type"); Validation.IsNotNull(table, "table"); Type = type; Data = table; }
/// <summary> /// Instantiates and throws an event of the given type /// </summary> public void ThrowEvent <T>(object sender, EventTable table) where T : EventBase { Log.DebugFormat("Create instance of Event to throw with Type {0}", typeof(T)); EventBase evt; try { evt = Activator.CreateInstance <T>(); if (evt.IsNull()) { throw new InstanceNotFoundException(string.Format(Resources.ERR_EVENT_INSTANTIATE_FAILURE, typeof(T))); } } catch { throw new InstanceNotFoundException(string.Format(Resources.ERR_EVENT_INSTANTIATE_FAILURE, typeof(T))); } evt.Args = new RealmEventArgs(table); ThrowEvent(sender, evt); }
/// <summary> /// Initializes a new instance of the class with the given event table /// </summary> public RealmEventArgs(EventTable table) { Validation.IsNotNull(table, "table"); Data = table; }
/// <summary> /// Initializes a new instance of the class /// </summary> public RealmEventArgs() { Data = new EventTable(); }
/// <summary> /// Constructor /// </summary> /// <param name="table"></param> /// <param name="callback"></param> public BooleanSet(EventTable table, EventCallback <RealmEventArgs> callback) { _callback = callback; _set = new Dictionary <string, bool>(); _table = table; }
/// <summary> /// Overload function for throwing an event /// </summary> public void ThrowEvent(object sender, IEventBase thrownEvent, EventTable table) { thrownEvent.Args = new RealmEventArgs(table); ThrowEvent(sender, thrownEvent); }