Esempio n. 1
0
        public InfoPlusResponse OnActionClicking(InfoPlusEvent e)
        {
            string method = string.Format("OnStep{0}Action{1}Clicking",
                                          AbstractMessenger.ToFirstUpper(e.Step.StepCode),
                                          AbstractMessenger.ToFirstUpper(e.ActionCode));

            return(this.CallEventMethodWrapper(method, e));
        }
Esempio n. 2
0
 public InfoPlusResponse OnStepWithdrawn(InfoPlusEvent e)
 {
     if (string.IsNullOrEmpty(e.ActionCode))
     {
         string method = string.Format("OnStep{0}Withdrawn", AbstractMessenger.ToFirstUpper(e.Step.StepCode));
         return(this.CallEventMethodWrapper(method, e));
     }
     else
     {
         string method = string.Format("OnStep{0}Action{1}Withdrawn",
                                       AbstractMessenger.ToFirstUpper(e.Step.StepCode),
                                       AbstractMessenger.ToFirstUpper(e.ActionCode));
         return(this.CallEventMethodWrapper(method, e));
     }
 }
Esempio n. 3
0
        public InfoPlusResponse OnActionDone(InfoPlusEvent e)
        {
            var methods    = new List <string>();
            var stepCode   = AbstractMessenger.ToFirstUpper(e.Step.StepCode);
            var actionCode = AbstractMessenger.ToFirstUpper(e.ActionCode);

            methods.Add(string.Format("OnStep{0}Action{1}Done", stepCode, actionCode));
            if (null != e.NextSteps)
            {
                foreach (var step in e.NextSteps)
                {
                    methods.Add(string.Format("ToStep{0}Done", AbstractMessenger.ToFirstUpper(step.StepCode)));
                }
            }
            if (null != e.EndStep)
            {
                methods.Add(string.Format("ToStep{0}Done", AbstractMessenger.ToFirstUpper(e.EndStep.StepCode)));
            }

            bool called   = false;
            var  response = this.Update(e);

            foreach (string method in methods)
            {
                var r2 = this.CallEventMethod(method, e);
                if (null != r2)
                {
                    called    = true;
                    response += r2;
                }
            }
            if (false == called)
            {
                System.Diagnostics.Trace.WriteLine("All Methods in (" +
                                                   string.Join(",", methods.ToArray()) + ") are not found.");
            }

            return(response);
        }
Esempio n. 4
0
        public InfoPlusResponse OnStepExpired(InfoPlusEvent e)
        {
            string method = string.Format("OnStep{0}Expired", AbstractMessenger.ToFirstUpper(e.Step.StepCode));

            return(this.CallEventMethodWrapper(method, e));
        }