Exemple #1
0
 public Command(IErrorHandler errorHandler, CommandCalculator calculator, bool fallbackCanExecute, bool isEmpty, object[] values)
 {
     this.errorHandler       = new WeakReference(errorHandler);
     this.calculator         = new WeakReference(calculator);
     this.fallbackCanExecute = fallbackCanExecute;
     this.isEmpty            = isEmpty;
     this.values             = values.Select(x => new WeakReference(x)).ToArray();
 }
Exemple #2
0
 public DXCommandConverter(DXCommandExtension owner, bool isEmpty) : base(owner)
 {
     this.calculator         = owner.Calculator;
     this.fallbackCanExecute = owner.FallbackCanExecute;
     this.isEmpty            = isEmpty;
 }
Exemple #3
0
 protected override void Init()
 {
     TreeInfo   = new CommandTreeInfo(Execute, CanExecute, ErrorHandler);
     Calculator = new CommandCalculator(TreeInfo.ExecuteExpr, TreeInfo.CanExecuteExpr, FallbackCanExecute, ErrorHandler);
     Calculator.Init(TypeResolver);
 }