void QueueCommand (SmtpCommand type, string command, CancellationToken cancellationToken) { var bytes = Encoding.UTF8.GetBytes (command + "\r\n"); // Note: queued commands will be buffered by the stream Stream.Write (bytes, 0, bytes.Length, cancellationToken); queued.Add (type); }