Exemplo n.º 1
0
 private void OnMessageRead(MessagePipeReader sender, Message message)
 {
     if (EventOccured != null)
     {
         EventOccured.Invoke(this, new GenericEventArgs <Message>(message));
     }
 }
Exemplo n.º 2
0
 private void OnEventOccured(IGameLogicsEvent i_Event)
 {
     if (EventOccured != null)
     {
         EventOccured.Invoke(i_Event);
     }
 }
Exemplo n.º 3
0
        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));
            }
        }
Exemplo n.º 4
0
        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();
            }
        }
Exemplo n.º 5
0
#pragma warning disable 1998
        public async Task Publish <TEvent>() where TEvent : BaseNextApiEvent
#pragma warning restore 1998
        {
            EventOccured?.Invoke(typeof(TEvent), null);
        }
Exemplo n.º 6
0
#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);
        }
Exemplo n.º 7
0
 private void _RaiseOnEventOccured(EventItem item)
 => EventOccured?.Invoke(this, new EventOccuredEventArgs(item));
Exemplo n.º 8
0
 /// <inheritdoc />
 public void Publish(object payload = null)
 {
     EventOccured?.Invoke();
 }
Exemplo n.º 9
0
 public void Notify(EventType type, EventArgs args = null)
 {
     EventOccured?.Invoke(type, args);
 }
Exemplo n.º 10
0
 private void OnEventOccured(string errorText)
 {
     EventOccured?.Invoke(this, errorText);
 }
Exemplo n.º 11
0
 private void OnEventOccurred(ProcessHelperEvent args)
 {
     processEvents.Enqueue(args);
     EventOccured?.Invoke(this, args);
 }
Exemplo n.º 12
0
 public void Log(string information, bool isError)
 {
     EventOccured?.Invoke(this, new LogEvent(information, isError));
 }