InheritanceAttribute Classe

Definição

Indica se o componente associado a esse atributo foi herdado de uma classe base.Indicates whether the component associated with this attribute has been inherited from a base class. Essa classe não pode ser herdada.This class cannot be inherited.

public ref class InheritanceAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Property)]
public sealed class InheritanceAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Event | System.AttributeTargets.Field | System.AttributeTargets.Property)>]
type InheritanceAttribute = class
    inherit Attribute
Public NotInheritable Class InheritanceAttribute
Inherits Attribute
Herança
InheritanceAttribute
Atributos

Comentários

InheritanceAttribute representa o tipo e o nível de herança de um membro.InheritanceAttribute represents the type and level of inheritance of a member.

Quando o AddInheritedComponents método de IInheritanceService pesquisa os campos de componente de um componente para identificar os campos que são herdados de uma classe base, o método representa o nível de herança de cada componente usando um InheritanceAttribute .When the AddInheritedComponents method of the IInheritanceService searches the component fields of a component to identify fields that are inherited from a base class, the method represents the inheritance level of each component using an InheritanceAttribute.

Construtores

InheritanceAttribute()

Inicializa uma nova instância da classe InheritanceAttribute.Initializes a new instance of the InheritanceAttribute class.

InheritanceAttribute(InheritanceLevel)

Inicializa uma nova instância da classe InheritanceAttribute com o nível de herança especificado.Initializes a new instance of the InheritanceAttribute class with the specified inheritance level.

Campos

Default

Especifica o valor padrão para InheritanceAttribute é NotInherited.Specifies that the default value for InheritanceAttribute is NotInherited. Este campo é somente leitura.This field is read-only.

Inherited

Especifica que o componente é herdado.Specifies that the component is inherited. Este campo é somente leitura.This field is read-only.

InheritedReadOnly

Especifica que o componente é herdado e somente leitura.Specifies that the component is inherited and is read-only. Este campo é somente leitura.This field is read-only.

NotInherited

Especifica que o componente não é herdado.Specifies that the component is not inherited. Este campo é somente leitura.This field is read-only.

Propriedades

InheritanceLevel

Obtém ou define o nível atual de herança armazenado nesse atributo.Gets or sets the current inheritance level stored in this attribute.

TypeId

Quando implementado em uma classe derivada, obtém um identificador exclusivo para este Attribute.When implemented in a derived class, gets a unique identifier for this Attribute.

(Herdado de Attribute)

Métodos

Equals(Object)

Substituição para testar a igualdade.Override to test for equality.

GetHashCode()

Retorna o código hash para esse objeto.Returns the hashcode for this object.

GetType()

Obtém o Type da instância atual.Gets the Type of the current instance.

(Herdado de Object)
IsDefaultAttribute()

Obtém um valor que indica se o valor atual do atributo é o valor padrão do atributo.Gets a value indicating whether the current value of the attribute is the default value for the attribute.

Match(Object)

Quando substituído em uma classe derivada, retorna um valor que indica se essa instância é igual a um objeto especificado.When overridden in a derived class, returns a value that indicates whether this instance equals a specified object.

(Herdado de Attribute)
MemberwiseClone()

Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object.

(Herdado de Object)
ToString()

Converte este atributo em uma cadeia de caracteres.Converts this attribute to a string.

Implantações explícitas de interface

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

Mapeia um conjunto de nomes para um conjunto correspondente de identificadores de expedição.Maps a set of names to a corresponding set of dispatch identifiers.

(Herdado de Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

Recupera as informações de tipo para um objeto, que pode ser usado para obter as informações de tipo para uma interface.Retrieves the type information for an object, which can be used to get the type information for an interface.

(Herdado de Attribute)
_Attribute.GetTypeInfoCount(UInt32)

Retorna o número de interfaces de informações do tipo que um objeto fornece (0 ou 1).Retrieves the number of type information interfaces that an object provides (either 0 or 1).

(Herdado de Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

Fornece acesso a propriedades e métodos expostos por um objeto.Provides access to properties and methods exposed by an object.

(Herdado de Attribute)

Aplica-se a

Confira também