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(); }
public DXCommandConverter(DXCommandExtension owner, bool isEmpty) : base(owner) { this.calculator = owner.Calculator; this.fallbackCanExecute = owner.FallbackCanExecute; this.isEmpty = isEmpty; }
protected override void Init() { TreeInfo = new CommandTreeInfo(Execute, CanExecute, ErrorHandler); Calculator = new CommandCalculator(TreeInfo.ExecuteExpr, TreeInfo.CanExecuteExpr, FallbackCanExecute, ErrorHandler); Calculator.Init(TypeResolver); }