コード例 #1
0
 /// <summary>
 /// Remove subscriber
 /// </summary>
 /// <param name="eventSourceSubscriber"></param>
 internal void Remove(EventSourceSubscriber eventSourceSubscriber)
 {
     lock (_subscriptions) {
         _subscriptions.Remove(eventSourceSubscriber);
     }
     UpdateEventLevel();
 }
コード例 #2
0
            /// <summary>
            /// Add subscriber
            /// </summary>
            /// <param name="subscriber"></param>
            /// <returns></returns>
            internal EventSourceSubscriber Add(IEventSourceSubscriber subscriber)
            {
                var subscription = new EventSourceSubscriber(subscriber, this);

                lock (_subscriptions) {
                    _subscriptions.Add(subscription);
                }
                UpdateEventLevel();
                return(subscription);
            }