Ejemplo n.º 1
0
 internal void AddSubscriptionRequest(SubscriptionRequest request)
 {
     _subscriptionRequestsLock.EnterWriteLock();
     try
     {
         SubscriptionRequests.Add(request);
     }
     finally
     {
         _subscriptionRequestsLock.ExitWriteLock();
     }
 }
Ejemplo n.º 2
0
        internal IEnumerable <SubscriptionRequest> FilterSubscriptionRequests(Predicate <SubscriptionRequest> predicate)
        {
            List <SubscriptionRequest> filteredSubscriptionRequests;

            _subscriptionRequestsLock.EnterReadLock();
            try
            {
                filteredSubscriptionRequests = SubscriptionRequests.Where(s => predicate(s)).ToList(); //force enumerate
            }
            finally
            {
                _subscriptionRequestsLock.ExitReadLock();
            }
            return(filteredSubscriptionRequests);
        }
Ejemplo n.º 3
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     SubscriptionRequests.RemoveAt(0);
 }