示例#1
0
        public static ISequencerUC Run <TResult>(this ISequencerUC sequencer, Func <TResult> func)
        {
            if (!(sequencer is SequencerRegisterUC register))
            {
                return(sequencer);
            }

            register.ExceptionRegister.TryReThrowException();
            ISequencerTaskRegister taskRegister = register.TaskRegister;

            taskRegister.Run(func);
            return(sequencer);
        }
示例#2
0
        public static ISequencerUC Run(this ISequencerUC sequencer, object obj, Action <ISequencerUC, object> action)
        {
            if (!(sequencer is SequencerRegisterUC register))
            {
                return(sequencer);
            }

            register.ExceptionRegister.TryReThrowException();
            ISequencerTaskRegister taskRegister = register.TaskRegister;

            taskRegister.Run(obj, action);
            return(sequencer);
        }
        public static ISequencerUC Run(this ISequencerUC sequencer, object obj, Action <object> action)
        {
            SequencerRegisterUC register = sequencer as SequencerRegisterUC;

            if (register == null)
            {
                return(sequencer);
            }

            register.ExceptionRegister.TryReThrowException();
            ISequencerTaskRegister taskRegister = register.TaskRegister;

            taskRegister.Run(obj, action);
            return(sequencer);
        }
示例#4
0
        ISequencerUC Run <TParameter>(this       ISequencerUC sequencer,
                                      TParameter parameter,
                                      Action <ISequencerUC, TParameter> action)
        {
            if (!(sequencer is SequencerRegisterUC register))
            {
                return(sequencer);
            }

            register.ExceptionRegister.TryReThrowException();
            ISequencerTaskRegister taskRegister = register.TaskRegister;

            taskRegister.Run(parameter, action);
            return(sequencer);
        }
        public static ISequencerUC Run <TResult>(this ISequencerUC sequencer, Func <ISequencerUC, TResult> func)
        {
            SequencerRegisterUC register = sequencer as SequencerRegisterUC;

            if (register == null)
            {
                return(sequencer);
            }

            register.ExceptionRegister.TryReThrowException();
            ISequencerTaskRegister taskRegister = register.TaskRegister;

            taskRegister.Run(func);
            return(sequencer);
        }