public bool Invoke(object caller, XEventArgs data) { if (!data.CanConvertTo(ArgsType)) { throw new ArgumentException($"Event arguments must match the event's registered type: {data.GetType()} is not a {ArgsType}!"); } return(Invoke(caller, (T)data)); }
public T GetArgs(byte[] data) { return(XEventArgs.DeserializeFromBitstream <T>(data)); }