public void Execute(ConversationLifeCycleStage stage, IConversation conversation){ if(OnIntercept!=null){ var args = new OnInterceptEventArgs(stage, conversation); OnIntercept(this, args); if(args.Handled){ return; } } switch (stage){ case ConversationLifeCycleStage.Init: OnInit(conversation); break; case ConversationLifeCycleStage.Enter: OnEnter(conversation); break; case ConversationLifeCycleStage.Leave: OnLeave(conversation); break; case ConversationLifeCycleStage.Finish: OnFinish(conversation); break; } }
public OnInterceptEventArgs(ConversationLifeCycleStage stage, IConversation conversation){ this.Stage = stage; this.Conversation = conversation; }