예제 #1
0
        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));
        }
예제 #2
0
 public T GetArgs(byte[] data)
 {
     return(XEventArgs.DeserializeFromBitstream <T>(data));
 }