コード例 #1
0
        public void Execute(IEnumerable<IAction> actions)
        {
            foreach (var action in actions)
            {
                var args = new ActionExecutedEventArgs(action.GetType().Name);

                if (ActionExecuting != null)
                    ActionExecuting(args);

                Thread.Sleep(_rnd.Next(1000, 3000));

                action.Execute();

                if (ActionExecuted != null)
                    ActionExecuted(args);
            }
        }
コード例 #2
0
 void Executioner_ActionExecuting(ActionExecutedEventArgs args)
 {
     Clients.Caller.alertExecutingAction(args.ActionTypeName);
 }