public void ReadLineAsync(Action <FtpReply> callback) { if (callback == null) { throw new ArgumentNullException("callback"); } Func <string> w = ReadRawLine; w.BeginInvoke(asyncResult => { FtpReply result = null; try { result = new FtpReply(w.EndInvoke(asyncResult)); } finally { callback.Invoke(result); } }, null); }
public void ReadLineAsync(Action<FtpReply> callback) { if (callback == null) throw new ArgumentNullException("callback"); Func<string> w = ReadRawLine; w.BeginInvoke(asyncResult => { FtpReply result = null; try { result = new FtpReply(w.EndInvoke(asyncResult)); } finally { callback.Invoke(result); } }, null); }
/// <summary> /// Initalizes a new instance of a FtpResponseException /// </summary> /// <param name="reply">The FtpReply to build the exception from</param> public FtpCommandException(FtpReply reply) : this(reply.Code, reply.Message + reply.InfoMessages) { }