public StockState HandleTimeout(SellCommand command) { if(_version == command.Version) return new SoldState(command.Id); return this; }
public SellPageVM(SellPage page) { Page = page; ShowItems = new ShowItemsToSellCommand(this, new Operations()); SellCommand = new SellCommand(page); ItemsToSell = new ObservableCollection <Item>(); Page.dataGrid.ItemsSource = ItemsToSell; Page.time.Text = DateTime.Now.ToString(); }
public static async Task Main(string[] args) { ThreadPool.SetMinThreads(Environment.ProcessorCount * 15, Environment.ProcessorCount * 10); var _auditor = new AuditWriter(); var sell_service = new SellCommand(Service.SELL_SERVICE, _auditor); var sell_commit_service = new SellCommitCommand(Service.SELL_COMMIT_SERVICE, _auditor); var sell_cancel_service = new SellCancelCommand(Service.SELL_CANCEL_SERVICE, _auditor); List <Task> tasks = new List <Task> { sell_service.StartService(), sell_commit_service.StartService(), sell_cancel_service.StartService() }; await Task.WhenAll(tasks).ConfigureAwait(false); }
public async Task <IActionResult> Index(SellCommand command, string displayUrl) { try { command.UserId = CurrentUserService.UserId; command.CurrencyUrl = displayUrl; await Mediator.Send(command); return(RedirectToAction("Sells", "Factors")); } catch (ValidationException exception) { foreach (var(key, value) in exception.Errors) { ModelState.AddModelError(key, value[0]); } return(View(command)); } catch (NotFoundException exception) { return(NotFound(exception.Message)); } }
public StockState HandleTimeout(SellCommand command) { return this; }
public void HandleTimeout(SellCommand command) { _state = _state.HandleTimeout(command); }
public StockState HandleTimeout(SellCommand command) { return(this); }