public CalculatorViewModel( IAlertsService alertsService, IClipboardService clipboardService, ICommandFactoryService commandFactoryService, INavigationService navigationService, IPlatformInformationService platformInformationService) { _alertsService = alertsService; _clipboardService = clipboardService; _commandFactoryService = commandFactoryService; _navigationService = navigationService; _platformInformationService = platformInformationService; AllClearCommand = _commandFactoryService.Create(AllClear); ClearCommand = _commandFactoryService.Create(Clear); DeleteCommand = _commandFactoryService.Create(async() => await Delete()); BinaryOperatorCommand = _commandFactoryService.Create <string>(async(symbol) => await BinaryOperator(symbol)); UnaryOperatorCommand = _commandFactoryService.Create <string>(async(symbol) => await UnaryOperator(symbol)); ParenthesisCommand = _commandFactoryService.Create <string>(async(parenthesis) => await Parenthesis(parenthesis)); VariableStorageCommand = _commandFactoryService.Create <string>(async(symbol) => await VariableStorage(symbol)); NumberCommand = _commandFactoryService.Create <string>(async(number) => await Number(number)); DecimalCommand = _commandFactoryService.Create(async() => await Decimal()); CalculateCommand = _commandFactoryService.Create(async() => await Calculate()); CopyCommand = _commandFactoryService.Create(async() => await Copy()); PasteCommand = _commandFactoryService.Create(async() => await Paste()); SelectInputSectionCommand = _commandFactoryService.Create <InputSectionViewModel>(async(inputSectionViewModel) => await SelectInputSection(inputSectionViewModel)); ManageInputCharacterCommand = _commandFactoryService.Create <string>(async(character) => await ManageInputCharacter(character)); ShowHistoryCommand = _commandFactoryService.Create(async() => await ShowHistory()); NavigateToSettingsCommand = _commandFactoryService.Create(async() => await NavigateToSettings()); NavigateToAboutCommand = _commandFactoryService.Create(async() => await NavigateToAbout()); Input.CollectionChanged += Input_CollectionChanged; }
public ViewModelFactoryService( IKernel ninjectKernel, ICommandFactoryService commandFactoryService) { this.ninjectKernel = ninjectKernel; this.commandFactoryService = commandFactoryService; }
public CommandProcessingService(ICommandFactoryService commandFactory, IUIService uiService) { this.uiService = uiService; this.commandFactory = commandFactory; this.commandsBeingProcessed = new ConcurrentBag <string>(); }