private void OnEventHubMessageReceived(object sender, EventHubMessagesEventArg e)
 {
     if (action != null)
     {
         action(e);
     }
 }
Beispiel #2
0
        private void OnMessageReceived(EventHubMessagesEventArg value)
        {
            lock (typeof(ReceiverQueue))
            {
                List <Tuple <string, Action <EventHubMessagesEventArg> > > list = null;
                //rwls.EnterReadLock();
                try
                {
                    if (items.ContainsKey(value.EventHubName))
                    {
                        list = items[value.EventHubName].Item1;
                    }
                }
                finally
                {
                    //rwls.ExitReadLock();
                }

                if (list != null)
                {
                    foreach (var item in list)
                    {
                        item.Item2(value);
                    }
                }
            }
        }
 private void OnEventHubMessagesReveived(EventHubMessagesEventArg value)
 {
     if (action != null)
     {
         action(value);
     }
 }