예제 #1
0
        internal void ControllerCallbackOccured(object sender, SubscriberDataEventArgs <RequestStatusChangedItem> e)
        {
            foreach (RequestStatusChangedItem item in e.DataList)
            {
                if (!string.IsNullOrEmpty(_externalAction.UniqueID) &&
                    ((_externalAction.UniqueID == item.Input.RequestStatus.RequestToken.Id.ToString())))
                {
                    _externalAction.ExternalCallbackItem = item;
                    _externalAction.EventListenerCallback.Set();

                    break;
                }
            }
        }
예제 #2
0
        internal void ControllerCallbackOccured(object sender, SubscriberDataEventArgs <InternalAPICallbackItem> e)
        {
            foreach (InternalAPICallbackItem item in e.DataList)
            {
                if (!string.IsNullOrEmpty(_InternalAction.UniqueID) &&
                    ((_InternalAction.UniqueID == item.RequestID) || (_InternalAction.UniqueID == item.JobKey.Value.ToString())))
                {
                    _InternalAction.InternalCallbackItem = item;
                    _InternalAction.EventListenerCallback.Set();

                    break;
                }
            }
        }
예제 #3
0
        private static void ExceptionCallbackOccured(object sender, SubscriberDataEventArgs <ExceptionSubscriberItem> e)
        {
            //Capture the item and do with it what you will.

            if ((null != e) &&
                (0 < e.DataList.Count) &&
                (null != e.DataList[0].ExceptionsArrivedInput) &&
                (null != e.DataList[0].ExceptionsArrivedInput.MeterExceptionCollection) &&
                (e.DataList[0].ExceptionsArrivedInput.MeterExceptionCollection.Length > 0))
            {
                foreach (MeterException me in e.DataList[0].ExceptionsArrivedInput.MeterExceptionCollection)
                {
                    //Do what you will with each event
                }
            }
        }
예제 #4
0
        private static void EventCallbackOccured(object sender, SubscriberDataEventArgs <EventSubscriberItem> e)
        {
            //Capture the item and do with it what you will.

            if ((null != e) &&
                (0 < e.DataList.Count) &&
                (null != e.DataList[0].EventsArrivedInput) &&
                (null != e.DataList[0].EventsArrivedInput.EventLog) &&
                (e.DataList[0].EventsArrivedInput.EventLog.MeterEvents.Length > 0))
            {
                foreach (MeterEvent me in e.DataList[0].EventsArrivedInput.EventLog.MeterEvents)
                {
                    //Do what you will with each event
                }
            }
        }
예제 #5
0
 private static void InternalCallbackOccured(object sender, SubscriberDataEventArgs <InternalAPICallbackItem> e)
 {
     //Capture the item and do with it what you will.
     _internalCallbackItem = e.DataList[0];
 }
예제 #6
0
 private static void RequestStatusChangedCallbackOccured(object sender, SubscriberDataEventArgs <RequestStatusChangedItem> e)
 {
     //Capture the item and do with it what you will.
     _requestStatusChangedItem = e.DataList[0];
 }