public UserCollection GetUserList() { DirectoryInfo dir=new DirectoryInfo(path); UserCollection userlist=new UserCollection(); foreach (FileInfo f in dir.GetFiles("*.user")) { User u=GetUser(f.Name.Substring(0,f.Name.IndexOf(f.Extension))); userlist.Add(u); } return userlist; }
/// <summary> /// <para> /// Initializes a new instance of <see cref='.UserCollection'/> based on another <see cref='.UserCollection'/>. /// </para> /// </summary> /// <param name='value'> /// A <see cref='.UserCollection'/> from which the contents are copied /// </param> public UserCollection(UserCollection value) { this.AddRange(value); }
public UserEnumerator(UserCollection mappings) { this.temp = ((IEnumerable)(mappings)); this.baseEnumerator = temp.GetEnumerator(); }
/// <summary> /// <para> /// Adds the contents of another <see cref='.UserCollection'/> to the end of the collection. /// </para> /// </summary> /// <param name='value'> /// A <see cref='.UserCollection'/> containing the objects to add to the collection. /// </param> /// <returns> /// <para>None.</para> /// </returns> /// <seealso cref='.UserCollection.Add'/> public void AddRange(UserCollection value) { for (int i = 0; (i < value.Count); i = (i + 1)) { this.Add(value[i]); } }