Beispiel #1
0
 /// <summary> Parse message. </summary>
 /// <param name="line"> The received command line. </param>
 /// <returns> The received command. </returns>
 private ReceivedCommand ParseMessage(string line)
 {
     // Split line in command and arguments
     //var splitLine =  Escaping.Split(line, _fieldSeparator, _escapeCharacter, StringSplitOptions.RemoveEmptyEntries);
     //var command = new ReceivedCommand(splitLine);
     return
         (new ReceivedCommand(Escaping.Split(line, _fieldSeparator, _escapeCharacter,
                                             StringSplitOptions.RemoveEmptyEntries)));
 }
Beispiel #2
0
        /// <summary> Parse message. </summary>
        /// <param name="line"> The received command line. </param>
        /// <returns> The received command. </returns>
        private ReceivedCommand ParseMessage(string line)
        {
            // Trim and clean line
            var cleanedLine = line.Trim('\r', '\n');

            cleanedLine = Escaping.Remove(cleanedLine, _commandSeparator, _escapeCharacter);

            return
                (new ReceivedCommand(Escaping.Split(cleanedLine, _fieldSeparator, _escapeCharacter,
                                                    StringSplitOptions.RemoveEmptyEntries)));
        }