예제 #1
0
 public void BeginStage()
 {
     if (_stage != null)
     {
         throw new NotSupportedException("Before begin new stage you must close a previous one");
     }
     _stage = new SubscriptionStage();
 }
예제 #2
0
 public void CloseStage()
 {
     foreach (var receiver in _stage.receivers)
     {
         Unregister(receiver);
     }
     foreach (var subscription in _stage.subscriptions)
     {
         foreach (var dDelegate in subscription.Value)
         {
             _subscriptions[subscription.Key].Remove(dDelegate);
         }
     }
     _stage = null;
 }