private void FinishCommand() { lock (_lock) { _command = null; _state = CommandParseState.Idle; _commandParser.Cleanup(); } }
private void HandleData(string request, ref int start) { if (_command.HandleData(request, ref start)) { FinishCommand(); } else { _state = CommandParseState.Data; } }
/// <summary> /// Инициализирует экземпляр <see cref="CommandParseResult{TModel}"/>. /// </summary> /// <param name="parseState">Состояние разбора команды.</param> protected CommandParseResult(CommandParseState parseState) { ParseState = parseState; }