public override ProfileInfoCollection GetAllProfiles(ProfileAuthenticationOption authenticationOption, int pageIndex, int pageSize, out int totalRecords) { ProfileInfoCollection pc = new ProfileInfoCollection(); totalRecords = 0; switch (authenticationOption) { case ProfileAuthenticationOption.All: { List <SystemUserWrapper> users = SystemUserWrapper.FindAll(((pageIndex - 1) * pageSize), pageSize, out totalRecords); foreach (SystemUserWrapper user in users) { pc.Add(new ProfileInfo(user.UserLoginID, false, user.LastActivityDate, user.LastLoginDate, 0)); } return(pc); }; break; case ProfileAuthenticationOption.Anonymous: { return(pc); }; break; case ProfileAuthenticationOption.Authenticated: { List <SystemUserWrapper> users = SystemUserWrapper.FindAuthenticatedUserAll(((pageIndex - 1) * pageSize), pageSize, out totalRecords); foreach (SystemUserWrapper user in users) { pc.Add(new ProfileInfo(user.UserLoginID, false, user.LastActivityDate, user.LastLoginDate, 0)); } return(pc); }; break; default: return(pc); break; } }