コード例 #1
0
 /// <summary>
 /// Adds the contents of another <see cref="FTPConfigInfoCollection">FTPConfigInfoCollection</see> to the end of the collection.
 /// </summary>
 /// <param name="value">A <see cref="FTPConfigInfoCollection">FTPConfigInfoCollection</see> containing the Components to add to the collection. </param>
 public void AddRange(FTPConfigInfoCollection value)
 {
     for (int i = 0; (i < value.Count); i = (i + 1))
     {
         this.Add((FTPConfigInfo)value.List[i]);
     }
 }
コード例 #2
0
ファイル: FTPConfigs.cs プロジェクト: CocacolaSh/temp
        /// <summary>
        /// 测试保存FTP配置文件
        /// </summary>
        public static void TestSaveFTPConfigInfo()
        {
            FTPConfigInfoCollection ftps = new FTPConfigInfoCollection();

            ftps.Add(new FTPConfigInfo());
            Serializer.Save(ftps, @"F:\ftp.config");
        }
コード例 #3
0
ファイル: FTPConfigs.cs プロジェクト: CocacolaSh/temp
 /// <summary>
 /// 设置FTP对象信息
 /// </summary>
 private static void SetFtpConfigInfo()
 {
     ftpList = (FTPConfigInfoCollection)Serializer.Load(typeof(FTPConfigInfoCollection), m_configfilepath);
     FTPConfigInfoCollection.FTPConfigInfoCollectionEnumerator ftps = ftpList.GetEnumerator();
     //遍历集合并设置相应的FTP信息(静态)对象
     while (ftps.MoveNext())
     {
         if (ftps.Current.Default == 1 && ftps.Current.Enable == 1)
         {
             currentFtp = ftps.Current;
             break;
         }
     }
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FTPConfigInfoCollection">FTPConfigInfoCollection</see> class containing the elements of the specified source collection.
 /// </summary>
 /// <param name="value">A <see cref="FTPConfigInfoCollection">FTPConfigInfoCollection</see> with which to initialize the collection.</param>
 public FTPConfigInfoCollection(FTPConfigInfoCollection value)
 {
     this.AddRange(value);
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseConfigInfoCollectionEnumerator">BaseConfigInfoCollectionEnumerator</see> class referencing the specified <see cref="FTPConfigInfoCollection">FTPConfigInfoCollection</see> object.
 /// </summary>
 /// <param name="mappings">The <see cref="FTPConfigInfoCollection">FTPConfigInfoCollection</see> to enumerate.</param>
 public FTPConfigInfoCollectionEnumerator(FTPConfigInfoCollection mappings)
 {
     _temp       = ((IEnumerable)(mappings));
     _enumerator = _temp.GetEnumerator();
 }