1 //------------------------------------------------------------------------------
2 // <copyright file="ProfileProvider.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //------------------------------------------------------------------------------
9 * Copyright (c) 2002 Microsoft Corporation
11 namespace System.Web.Profile
13 using System.Security.Principal;
14 using System.Security.Permissions;
15 using System.Collections;
16 using System.Collections.Specialized;
17 using System.Web.Configuration;
18 using System.Web.Util;
19 using System.Web.Security;
20 using System.Web.Compilation;
21 using System.Configuration;
22 using System.Configuration.Provider;
23 using System.Reflection;
26 public abstract class ProfileProvider : SettingsProvider
28 public abstract int DeleteProfiles (ProfileInfoCollection profiles);
29 public abstract int DeleteProfiles (string[] usernames);
31 public abstract int DeleteInactiveProfiles (ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate);
32 public abstract int GetNumberOfInactiveProfiles (ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate);
34 public abstract ProfileInfoCollection GetAllProfiles (ProfileAuthenticationOption authenticationOption, int pageIndex, int pageSize, out int totalRecords);
35 public abstract ProfileInfoCollection GetAllInactiveProfiles (ProfileAuthenticationOption authenticationOption, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords);
36 public abstract ProfileInfoCollection FindProfilesByUserName (ProfileAuthenticationOption authenticationOption, string usernameToMatch, int pageIndex, int pageSize, out int totalRecords);
37 public abstract ProfileInfoCollection FindInactiveProfilesByUserName(ProfileAuthenticationOption authenticationOption, string usernameToMatch, DateTime userInactiveSinceDate, int pageIndex, int pageSize, out int totalRecords);
40 public sealed class ProfileProviderCollection : SettingsProviderCollection
42 public override void Add(ProviderBase provider)
44 if( provider == null )
46 throw new ArgumentNullException( "provider" );
49 if( !( provider is ProfileProvider ) )
51 throw new ArgumentException(SR.GetString(SR.Provider_must_implement_type, typeof(ProfileProvider).ToString()), "provider");
57 new public ProfileProvider this[string name]
61 return (ProfileProvider) base[name];