Exemplo n.º 1
0
        /// <summary>
        /// Obtain a list of the receivers of the event raise.
        /// </summary>
        /// <param name="specific">True to get the specific for this one, false to get the "subscribe to all"</param>
        public HotSwapDictionary <ClientId, ClientEventSubscriptionInfo> GetReceivers(ClientId sourceId, bool specific)
        {
            HotSwapDictionary <ClientId, ClientEventSubscriptionInfo> result;

            if (specific)
            {
                if (_subscriptionsHotSwap.TryGetValue(sourceId, out result) == false)
                {// If not found, return an empty one.
                    result = new HotSwapDictionary <ClientId, ClientEventSubscriptionInfo>();
                }
            }
            else
            {
                if (_subscriptionsHotSwap.TryGetValue(SubscribeToAllId, out result) == false)
                {// If not found, return an empty one.
                    result = new HotSwapDictionary <ClientId, ClientEventSubscriptionInfo>();
                }
            }

            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 internal ClientEventSubscriptionInfo()
 {
     Data = new HotSwapDictionary<MethodInfo,int>();
 }
Exemplo n.º 3
0
        /// <summary>
        /// Obtain a list of the receivers of the event raise.
        /// </summary>
        /// <param name="specific">True to get the specific for this one, false to get the "subscribe to all"</param>
        public HotSwapDictionary<ClientId, ClientEventSubscriptionInfo> GetReceivers(ClientId sourceId, bool specific)
        {
            HotSwapDictionary<ClientId, ClientEventSubscriptionInfo> result;
            if (specific)
            {
                if (_subscriptionsHotSwap.TryGetValue(sourceId, out result) == false)
                {// If not found, return an empty one.
                    result = new HotSwapDictionary<ClientId, ClientEventSubscriptionInfo>();
                }
            }
            else
            {
                if (_subscriptionsHotSwap.TryGetValue(SubscribeToAllId, out result) == false)
                {// If not found, return an empty one.
                    result = new HotSwapDictionary<ClientId, ClientEventSubscriptionInfo>();
                }
            }

            return result;
        }
Exemplo n.º 4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 internal ClientEventSubscriptionInfo()
 {
     Data = new HotSwapDictionary <MethodInfo, int>();
 }