コード例 #1
0
		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;
		}
コード例 #2
0
 /// <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);
 }
コード例 #3
0
 public UserEnumerator(UserCollection mappings)
 {
     this.temp           = ((IEnumerable)(mappings));
     this.baseEnumerator = temp.GetEnumerator();
 }
コード例 #4
0
ファイル: UserCollection.cs プロジェクト: emtees/old-code
		/// <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);
		}
コード例 #5
0
ファイル: UserCollection.cs プロジェクト: emtees/old-code
			public UserEnumerator(UserCollection mappings) 
			{
				this.temp = ((IEnumerable)(mappings));
				this.baseEnumerator = temp.GetEnumerator();
			}
コード例 #6
0
ファイル: UserCollection.cs プロジェクト: emtees/old-code
		/// <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]);
			}
		}