System.Web.Security.SqlMembershipProvider.BuildMembershipUserCollection C# (CSharp) Method

BuildMembershipUserCollection() private method

private BuildMembershipUserCollection ( DbCommand command, int pageIndex, int pageSize, int &totalRecords ) : System.Web.Security.MembershipUserCollection
command System.Data.Common.DbCommand
pageIndex int
pageSize int
totalRecords int
return System.Web.Security.MembershipUserCollection
		MembershipUserCollection BuildMembershipUserCollection (DbCommand command, int pageIndex, int pageSize, out int totalRecords)
		{
			DbDataReader reader = null;
			try {
				MembershipUserCollection users = new MembershipUserCollection ();
				reader = command.ExecuteReader ();
				while (reader.Read ())
					users.Add (GetUserFromReader (reader, null, null));

				totalRecords = Convert.ToInt32 (command.Parameters ["@ReturnValue"].Value);
				return users;
			} catch (Exception) {
				totalRecords = 0;
				return null; /* should we let the exception through? */
			}
			finally {
				if (reader != null)
					reader.Close ();
			}
		}