Beispiel #1
0
 public void AddActivity(Activity handlerActivity, EventHandlingType handlingType)
 {
     switch (handlingType)
     {
         case EventHandlingType.Sync:
             SyncActivity = handlerActivity;
             break;
         case EventHandlingType.Async:
             throw new NotImplementedException();
     }
 }
Beispiel #2
0
        public void AddActivity(Activity handlerActivity, EventHandlingType handlingType)
        {
            switch (handlingType)
            {
            case EventHandlingType.Sync:
                SyncActivity = handlerActivity;
                break;

            case EventHandlingType.Async:
                throw new NotImplementedException();
            }
        }
 internal void SubscribeToEvent( 
     EventHolder eventHolder, Activity handlerActivity, EventHandlingType handlingType) 
 { 
     lock (s_eventHandlersDictSync) 
     { 
         EventActivityHandler handler; 
         if (!_eventHandlersDict.ContainsKey(eventHolder.EventName)) 
         { 
             handler = new EventActivityHandler(_workflowInstance); 
             _eventHandlersDict[eventHolder.EventName] = handler; 
             eventHolder.AddEventHandler(handler.Method); 
         } 
         else 
             handler = _eventHandlersDict[eventHolder.EventName]; 
         handler.AddActivity(handlerActivity, handlingType); 
     } 
 }