Beispiel #1
0
 public static void Store(EventDataEventArgs value)
 {
     if (value is null)
     {
         return;
     }
     value.ServiceName = null;
     value.EventName   = null;
     value.EventArgs   = null;
     ReferencePool <EventDataEventArgs> .Shared.Store(value);
 }
Beispiel #2
0
 private void Client_OnEventReceived(object sender, EventDataEventArgs e)
 {
     if (e.ServiceName != _serviceName || !_events.TryGetValue(e.EventName, out var value) ||
         !(value.GetValue(this) is MulticastDelegate evHandler))
     {
         return;
     }
     foreach (var handler in evHandler.GetInvocationList())
     {
         handler.DynamicInvoke(this, e.EventArgs);
     }
 }