private void Init() { string command = Encoding.GetString(_bytes); string[] commandParts = command.Split(' '); Match commandName = CommandFinder.Match(command); if (String.IsNullOrEmpty(commandName.Value) || commandName.Groups.Count != 3) { CommandName = commandParts.First().Trim('\n', '\r'); } else { CommandName = commandName.Groups[2].Value; } CommandName = CommandName.ToUpper(); Args = String.Empty; if (commandParts.Length > 1) { Args = String.Join(" ", commandParts.Skip(1)); } Args = Args.Trim('\n', '\r'); }