private void BuildOutput(string token, IAccount account, ApplicationUser applicationUser) { var output = new RegisterOutput(token, account, applicationUser); outputPort.Output(output); }
private void BuildOutput(IAccount account, ApplicationUser user) { var output = new GetAccountDetailsOutput(account, user); outputPort.Output(output); }
private void BuildOutput(ITable table) { var res = new ChangeTableTitleOutput(table); outputPort.Output(res); }
private void BuildOutput(ITableTask task) { var output = new AddTaskOutput(task); outputPort.Output(output); }
private void BuildOutput(ITableTask task) { var res = new DeleteTaskOutput(task); outputPort.Output(res); }
private void BuildOutput(ITable table) { var res = new GetTableDetailsOutput(table); outputPort.Output(res); }
private void BuildOutput(ITable table) { var output = new CreateTableOutput(table); outputPort.Output(output); }
private void BuildOutput(string Token, ApplicationUser applicationUser) { var output = new LoginOutput(Token, applicationUser); outputPort.Output(output); }
private VirtualMachineRunResult Run(int CodeStart, int CodeLen, int Cycle) { //обработка аргументов if (Cycle != 0 && MRAM[_ActionCell] == 0) { return(VirtualMachineRunResult.RanSuccessfully); } if (CodeStart == 0 && CodeLen == 0 && Cycle == 0) { Thread.CurrentThread.Name = this.ParentIDE.Title + " Running Thread"; Thread.CurrentThread.Priority = ThreadPriority.AboveNormal; } // int A = 0, L = 0, Z = 0; byte D = 0; VirtualMachineRunningErrorReaction Reaction = VirtualMachineRunningErrorReaction.Undefined; do { for (A = CodeStart; A < CodeStart + CodeLen; A++) { CURR_STEP : _NextSymbol = A; if (_NextSymbol != A) { A = _NextSymbol - 1; continue; } if (_Status == VirtualMachineRunningStatus.Breaking) { return(VirtualMachineRunResult.Broken); } switch (MRAM[A]) { case 62: // > Z = _ActionCell + 1; if (Z <= _CaretBound) { _ActionCell = Z; } else if (_RoundCaretRange) { _ActionCell = 0; } else { Error?.Invoke(this, VirtualMachineRunningErrorId.CellPointerOutOfRange, out Reaction); if (Reaction == VirtualMachineRunningErrorReaction.TryAgain) { goto CURR_STEP; } } break; case 60: // < Z = _ActionCell - 1; if (Z >= 0) { _ActionCell = Z; } else if (_RoundCaretRange) { _ActionCell = _CaretBound + Z + 1; } else { Error?.Invoke(this, VirtualMachineRunningErrorId.CellPointerOutOfRange, out Reaction); if (Reaction == VirtualMachineRunningErrorReaction.TryAgain) { goto CURR_STEP; } } break; case 43: // + Z = MRAM[_ActionCell] + 1; if (Z <= 255) { MRAM[_ActionCell] = (byte)Z; } else if (_RoundValueRange) { MRAM[_ActionCell] = (byte)(0 + Z - 255 - 1); } else { Error?.Invoke(this, VirtualMachineRunningErrorId.CellValueOutOfRange, out Reaction); if (Reaction == VirtualMachineRunningErrorReaction.TryAgain) { goto CURR_STEP; } } break; case 45: // - Z = MRAM[_ActionCell] - 1; if (Z >= 0) { MRAM[_ActionCell] = (byte)Z; } else if (_RoundValueRange) { MRAM[_ActionCell] = (byte)(255 - 0 + Z + 1); } else { Error?.Invoke(this, VirtualMachineRunningErrorId.CellValueOutOfRange, out Reaction); if (Reaction == VirtualMachineRunningErrorReaction.TryAgain) { goto CURR_STEP; } } break; case 46: // . _ActionOutputPort.Output(MRAM[_ActionCell]); break; case 44: // , MRAM[ActionCell] = _ActionInputPort.Input(); break; case 91: // [ L = XString.FindClosing(MRAM, A + 1, CodeLen - (A - CodeStart) - 1, '[', ']', "", "'" + (char)(34), "'" + (char)(34)) - A - 1; Run(A + 1, L, -1); A += L + 1; break; case 93: // ] MessageBox.Show(": Неожиданный символ " + (char)(34) + "]" + (char)(34) + " в позиции " + A.ToString() + (char)(10) + (char)(10) + "Завершение цикла без его начала", "Сообщение BF Machine", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); break; } } D += 1; if (D > _InterruptingPeriod) { Application.DoEvents(); D = 0; } } while ((Cycle != 0) && (MRAM[_ActionCell] != 0)); return(VirtualMachineRunResult.RanSuccessfully); }
private void BuildOutput(ITableTask task) { var res = new ChangeTitleTaskOutput(task); outputPort.Output(res); }
private void BuildOutput(ITable table) { var res = new DeleteTableOutput(table); outputPort.Output(res); }