ProfileProvider Classe
Definição
Define o contrato que o ASP.NET implementa para fornecer serviços de perfil usando provedores de criação de perfil personalizados.Defines the contract that ASP.NET implements to provide profile services using custom profile providers.
public ref class ProfileProvider abstract : System::Configuration::SettingsProvider
public abstract class ProfileProvider : System.Configuration.SettingsProvider
type ProfileProvider = class
inherit SettingsProvider
Public MustInherit Class ProfileProvider
Inherits SettingsProvider
- Herança
- Derivado
Exemplos
Para obter um exemplo de uma ProfileProvider implementação, consulte como compilar e executar o exemplo de provedor de perfil.For an example of a ProfileProvider implementation, see How to: Build and Run the Profile Provider Example.
Comentários
Os perfis ASP.NET oferecem armazenamento persistente e recuperação de propriedades específicas do usuário.ASP.NET profiles offer persistent storage and retrieval of user-specific properties. Os valores de propriedade de perfil e as informações são armazenados em uma fonte de dados de uma maneira determinada pela ProfileProvider implementação.Profile property values and information are stored in a data source in a manner determined by the ProfileProvider implementation. Você pode usar os provedores de perfil incluídos com o .NET Framework (representado pelas classes que derivam da ProfileProvider classe abstrata) ou pode implementar seu próprio provedor criando uma nova classe que deriva de ProfileProvider .You can use the profile providers that are included with the .NET Framework (represented by the classes that derive from the ProfileProvider abstract class), or you can implement your own provider by creating a new class that derives from ProfileProvider.
Há dois motivos principais para criar um provedor de perfil personalizado.There are two primary reasons for creating a custom profile provider.
Você precisa armazenar informações de perfil em uma fonte de dados que não é suportada pelos provedores de perfil incluídos no .NET Framework, como um banco de dados do FoxPro, um Oracle Database ou outros repositórios de armazenamento.You need to store profile information in a data source that is not supported by the profile providers included with the .NET Framework, such as a FoxPro database, an Oracle database, or other data stores.
Você precisa gerenciar informações de perfil usando um esquema de banco de dados diferente do esquema de banco de dados usado pelos provedores fornecidos com o .NET Framework.You need to manage profile information using a database schema that is different from the database schema used by the providers that ship with the .NET Framework. Um exemplo comum disso seria os dados do usuário que já existem em um banco de dado SQL Server para uma rede da empresa ou um site da Web.A common example of this would be user data that already exists in a SQL Server database for a company network or a Web site.
A ProfileProvider classe abstrata herda da SettingsProvider classe abstrata, que herda da ProviderBase classe abstrata.The ProfileProvider abstract class inherits from the SettingsProvider abstract class, which inherits from the ProviderBase abstract class. As classes que implementam ProfileProvider também devem implementar os membros necessários SettingsProvider das ProviderBase classes e abstratas.Classes that implement ProfileProvider must also implement the required members of the SettingsProvider and ProviderBase abstract classes. Para obter mais informações sobre como implementar um provedor de perfil, consulte implementando um provedor de perfil.For more information about implementing a profile provider, see Implementing a Profile Provider.
Construtores
| ProfileProvider() |
Inicializa uma nova instância da classe ProfileProvider.Initializes a new instance of the ProfileProvider class. |
Propriedades
| ApplicationName |
Obtém ou define o nome do aplicativo em execução no momento.Gets or sets the name of the currently running application. (Herdado de SettingsProvider) |
| Description |
Obtém uma breve descrição amigável adequada para exibição em ferramentas administrativas ou outras IUs (interfaces do usuário).Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs). (Herdado de ProviderBase) |
| Name |
Obtém o nome amigável usado para referir-se ao provedor durante a configuração.Gets the friendly name used to refer to the provider during configuration. (Herdado de ProviderBase) |
Métodos
| DeleteInactiveProfiles(ProfileAuthenticationOption, DateTime) |
Quando substituído em uma classe derivada, exclui todos os dados de perfil de usuário para os perfis em que a data da última atividade ocorreu antes da data especificada.When overridden in a derived class, deletes all user-profile data for profiles in which the last activity date occurred before the specified date. |
| DeleteProfiles(ProfileInfoCollection) |
Quando substituído em uma classe derivada, exclui informações e propriedades de perfil para a lista fornecida de perfis.When overridden in a derived class, deletes profile properties and information for the supplied list of profiles. |
| DeleteProfiles(String[]) |
Quando substituído em uma classe derivada, exclui as propriedades de perfil e as informações para perfis que correspondem a lista de nomes de usuário fornecida.When overridden in a derived class, deletes profile properties and information for profiles that match the supplied list of user names. |
| Equals(Object) |
Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object. (Herdado de Object) |
| FindInactiveProfilesByUserName(ProfileAuthenticationOption, String, DateTime, Int32, Int32, Int32) |
Quando substituído em uma classe derivada, recupera informações de perfil para perfis nos quais a data da última atividade ocorreu na data especificada ou antes e o nome de usuário corresponde ao nome de usuário especificado.When overridden in a derived class, retrieves profile information for profiles in which the last activity date occurred on or before the specified date and the user name matches the specified user name. |
| FindProfilesByUserName(ProfileAuthenticationOption, String, Int32, Int32, Int32) |
Quando substituído em uma classe derivada, recupera informações de perfil para perfis em que o nome de usuário corresponde aos nomes de usuário especificados.When overridden in a derived class, retrieves profile information for profiles in which the user name matches the specified user names. |
| GetAllInactiveProfiles(ProfileAuthenticationOption, DateTime, Int32, Int32, Int32) |
Quando substituído em uma classe derivada, recupera dados de perfil de usuário da fonte de dados para perfis em que a data da última atividade ocorreu na data especificada ou antes.When overridden in a derived class, retrieves user-profile data from the data source for profiles in which the last activity date occurred on or before the specified date. |
| GetAllProfiles(ProfileAuthenticationOption, Int32, Int32, Int32) |
Quando substituído em uma classe derivada, recupera dados de perfil do usuário para todos os perfis na fonte de dados.When overridden in a derived class, retrieves user profile data for all profiles in the data source. |
| GetHashCode() |
Serve como a função de hash padrão.Serves as the default hash function. (Herdado de Object) |
| GetNumberOfInactiveProfiles(ProfileAuthenticationOption, DateTime) |
Quando substituído em uma classe derivada, retorna o número de perfis no qual a data da última atividade ocorreu na data especificada ou antes.When overridden in a derived class, returns the number of profiles in which the last activity date occurred on or before the specified date. |
| GetPropertyValues(SettingsContext, SettingsPropertyCollection) |
Retorna a coleção de valores da propriedade de configurações para a instância do aplicativo e o grupo de propriedades de configurações especificados.Returns the collection of settings property values for the specified application instance and settings property group. (Herdado de SettingsProvider) |
| GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
| Initialize(String, NameValueCollection) |
Inicializa o construtor de configuração.Initializes the configuration builder. (Herdado de ProviderBase) |
| MemberwiseClone() |
Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object. (Herdado de Object) |
| SetPropertyValues(SettingsContext, SettingsPropertyValueCollection) |
Define os valores do grupo especificado de configurações de propriedade.Sets the values of the specified group of property settings. (Herdado de SettingsProvider) |
| ToString() |
Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object. (Herdado de Object) |