private void OnMessageRead(MessagePipeReader sender, Message message) { if (EventOccured != null) { EventOccured.Invoke(this, new GenericEventArgs <Message>(message)); } }
private void OnEventOccured(IGameLogicsEvent i_Event) { if (EventOccured != null) { EventOccured.Invoke(i_Event); } }
private void SendPoint(object state) { if (EventOccured == null) { return; } var values = _performanceCounterCollector.Collect(); foreach (var value in values) { EventOccured.Invoke(this, new GenericEventArgs <StatPoint>(value)); } }
private void OnNotifyEventCalled(object sender, ObjectEvent objectevent) { switch (objectevent.Objects.Type) { case TLCObjectType.Session: case TLCObjectType.Detector: case TLCObjectType.SpecialVehicleEventGenerator: EventOccured?.Invoke(this, objectevent); break; case TLCObjectType.TLCFacilities: case TLCObjectType.Intersection: case TLCObjectType.SignalGroup: case TLCObjectType.Input: case TLCObjectType.Output: case TLCObjectType.Variable: _logger.Warn("NotifyEvent() was called with object type {0}. This TLC-FI object type has no defined events.", objectevent.Objects.Type); break; default: throw new ArgumentOutOfRangeException(); } }
#pragma warning disable 1998 public async Task Publish <TEvent>() where TEvent : BaseNextApiEvent #pragma warning restore 1998 { EventOccured?.Invoke(typeof(TEvent), null); }
#pragma warning disable 1998 public async Task Publish <TEvent, TPayload>(TPayload payload) where TEvent : BaseNextApiEvent <TPayload> #pragma warning restore 1998 { EventOccured?.Invoke(typeof(TEvent), payload); }
private void _RaiseOnEventOccured(EventItem item) => EventOccured?.Invoke(this, new EventOccuredEventArgs(item));
/// <inheritdoc /> public void Publish(object payload = null) { EventOccured?.Invoke(); }
public void Notify(EventType type, EventArgs args = null) { EventOccured?.Invoke(type, args); }
private void OnEventOccured(string errorText) { EventOccured?.Invoke(this, errorText); }
private void OnEventOccurred(ProcessHelperEvent args) { processEvents.Enqueue(args); EventOccured?.Invoke(this, args); }
public void Log(string information, bool isError) { EventOccured?.Invoke(this, new LogEvent(information, isError)); }