Ejemplo n.º 1
0
 public static void ExcuteCommandWithoutDispatcher <T>(this IRegistorCommand <T> command, object param)
 {
     try
     {
         if (command.CanExecute(param))
         {
             command.Execute(param);
         }
     }
     catch (Exception ex)
     {
         LogExtensions.Critical(null, ex);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Uns the registor.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="command">The command.</param>
 /// <param name="target">The target.</param>
 public static void UnRegistor <T>(IRegistorCommand <T> command, object target)
 {
     command.UnRegistorCommand(target);
 }
Ejemplo n.º 3
0
 public static void ExcuteCommand <T>(this IRegistorCommand <T> command, object param)
 {
     ExcuteCommandWithoutDispatcher(command, param);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Registors the specified command.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="command">The command.</param>
 /// <param name="target">The target.</param>
 /// <param name="executeAction">The execute action.</param>
 /// <param name="canExecuteFunc">The can execute function.</param>
 public static void Registor <T>(IRegistorCommand <T> command, object target, Action <T> executeAction, Func <T, bool> canExecuteFunc)
 {
     command.RegistorCommand(target, executeAction, canExecuteFunc);
 }