/// <summary> /// Initalizes a new instance of an active ftp data stream /// </summary> /// <param name="chan"></param> public FtpActiveStream(FtpControlConnection chan) : base() { if (chan == null) { throw new ArgumentNullException("chan"); } this.ControlConnection = chan; }
/// <summary> /// Initalize object /// </summary> /// <param name="chan">The command channel this object is associated with</param> public FtpCommandResult(FtpControlConnection chan) { this.ResponseType = chan.ResponseType; this.ResponseMessage = chan.ResponseMessage; this.ResponseCode = chan.ResponseCode; if(chan.Messages != null) { this.Messages = new string[chan.Messages.Length]; Array.Copy(chan.Messages, this.Messages, chan.Messages.Length); } }
/// <summary> /// Initalize object /// </summary> /// <param name="chan">The command channel this object is associated with</param> public FtpCommandResult(FtpControlConnection chan) { this.ResponseType = chan.ResponseType; this.ResponseMessage = chan.ResponseMessage; this.ResponseCode = chan.ResponseCode; if (chan.Messages != null) { this.Messages = new string[chan.Messages.Length]; Array.Copy(chan.Messages, this.Messages, chan.Messages.Length); } }
/// <summary> /// Initalizes a new instance of a FtpResponseException /// </summary> /// <param name="chan"></param> public FtpCommandException(FtpControlConnection chan) : this(chan.ResponseCode, chan.ResponseMessage) { }
/// <summary> /// Initalizes an instance of FtpSecurityNotAvailable event args /// </summary> /// <param name="conn"></param> public FtpSecurityNotAvailable(FtpControlConnection conn) : base() { this.Connection = conn; }
/// <summary> /// Initalizes a new instance of passive data stream /// </summary> /// <param name="chan"></param> public FtpPassiveStream(FtpControlConnection chan) : base() { if(chan == null) { throw new ArgumentNullException("chan"); } this.ControlConnection = chan; }