/// <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]);
     }
 }
 /// <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]);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 设置FTP对象信息
        /// </summary>
        private static void SetFtpConfigInfo()
        {
            FTPConfigInfoCollection ftpconfiginfocollection = (FTPConfigInfoCollection)SerializationHelper.Load(typeof(FTPConfigInfoCollection), m_configfilepath);

            FTPConfigInfoCollection.FTPConfigInfoCollectionEnumerator fcice = ftpconfiginfocollection.GetEnumerator();

            //遍历集合并设置相应的FTP信息(静态)对象
            while (fcice.MoveNext())
            {
                if (fcice.Current.Name == "ForumAttach")
                {
                    m_forumattach = fcice.Current;
                    continue;
                }

                if (fcice.Current.Name == "SpaceAttach")
                {
                    m_spaceattach = fcice.Current;
                    continue;
                }

                if (fcice.Current.Name == "AlbumAttach")
                {
                    m_albumattach = fcice.Current;
                    continue;
                }

                if (fcice.Current.Name == "MallAttach")
                {
                    m_mallattach = fcice.Current;
                    continue;
                }

                if (fcice.Current.Name == "ForumAvatar")
                {
                    m_forumavatar = fcice.Current;
                    continue;
                }
            }
        }
 /// <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);
 }
 /// <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();
 }
 /// <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);
 }
 /// <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();
 }