예제 #1
0
        /// <summary>
        /// Merges two FtpItemCollection together into a single collection.
        /// </summary>
        /// <param name="items">Collection to merge with.</param>
        public void Merge(FtpItemCollection items)
        {
            if (items == null)
            {
                throw new ArgumentNullException("items", "must have a value");
            }

            foreach (FtpItem item in items)
            {
                FtpItem newItem = new FtpItem(item.Name, item.Modified, item.Size, item.SymbolicLink, item.Attributes, item.ItemType, item.RawText);
                newItem.ParentPath = item.ParentPath;
                this.Add(newItem);
            }
        }
예제 #2
0
 /// <summary>
 ///  Initializes a new instance of the PutFileAsyncCompletedEventArgs class.
 /// </summary>
 /// <param name="error">Any error that occurred during the asynchronous operation.</param>
 /// <param name="canceled">A value indicating whether the asynchronous operation was canceled.</param>
 /// <param name="directoryListing">A FtpItemCollection containing the directory listing.</param>
 public GetDirListAsyncCompletedEventArgs(Exception error, bool canceled, FtpItemCollection directoryListing)
     : base(error, canceled, null)
 {
     _directoryListing = directoryListing;
 }