DebuggerNonUserCodeAttribute Classe
Definição
Identifica um tipo ou membro que não faz parte do código de usuário para um aplicativo.Identifies a type or member that is not part of the user code for an application.
public ref class DebuggerNonUserCodeAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)]
public sealed class DebuggerNonUserCodeAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class DebuggerNonUserCodeAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)>]
type DebuggerNonUserCodeAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Struct, Inherited=false)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type DebuggerNonUserCodeAttribute = class
inherit Attribute
Public NotInheritable Class DebuggerNonUserCodeAttribute
Inherits Attribute
- Herança
- Atributos
Exemplos
O exemplo de código a seguir mostra o uso desse atributo em um projeto Visual Basic.The following code example shows the use of this attribute in a Visual Basic project.
' Form overrides Dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
Comentários
Os tipos fornecidos pelo designer e os membros que não fazem parte do código criado especificamente pelo usuário podem complicar a experiência de depuração.Designer provided types and members that are not part of the code specifically created by the user can complicate the debugging experience. Esse atributo suprime a exibição desses tipos de suplemento e membros na janela do depurador e percorre automaticamente, em vez de no, o código fornecido pelo designer.This attribute suppresses the display of these adjunct types and members in the debugger window and automatically steps through, rather than into, designer provided code. Quando o depurador encontra esse atributo ao percorrer o código do usuário, a experiência do usuário não vê o código fornecido pelo designer e a passa para a próxima instrução de código fornecida pelo usuário.When the debugger encounters this attribute when stepping through user code, the user experience is to not see the designer provided code and to step to the next user-supplied code statement.
Observação
O Common Language Runtime não anexa semântica a esse atributo.The common language runtime attaches no semantics to this attribute. Ele é fornecido para uso por depuradores de código-fonte.It is provided for use by source code debuggers. Por exemplo, no Visual Studio 2005, o depurador não exibe um elemento com esse atributo na janela do depurador, não é interrompido em um método com esse atributo e não permite que um ponto de interrupção seja definido no método.For example, in Visual Studio 2005, the debugger does not display an element with this attribute in the debugger window, does not stop in a method with this attribute, and does not allow a breakpoint to be set in the method.
O comportamento do depurador quando o DebuggerNonUserCodeAttribute está presente é semelhante ao uso de uma combinação do DebuggerHiddenAttribute atributo, que oculta o código do depurador e o DebuggerStepThroughAttribute atributo, que diz ao depurador para percorrer, em vez de, o código ao qual ele é aplicado.The debugger behavior when the DebuggerNonUserCodeAttribute is present is similar to using a combination of the DebuggerHiddenAttribute attribute, which hides the code from the debugger, and the DebuggerStepThroughAttribute attribute, which tells the debugger to step through, rather than into, the code it is applied to.
Construtores
| DebuggerNonUserCodeAttribute() |
Inicializa uma nova instância da classe DebuggerNonUserCodeAttribute.Initializes a new instance of the DebuggerNonUserCodeAttribute class. |
Propriedades
| 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) |
Retorna um valor que indica se essa instância é igual a um objeto especificado.Returns a value that indicates whether this instance is equal to a specified object. (Herdado de Attribute) |
| GetHashCode() |
Retorna o código hash para a instância.Returns the hash code for this instance. (Herdado de Attribute) |
| GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
| IsDefaultAttribute() |
Quando substituído em uma classe derivada, indica se o valor dessa instância é o valor padrão para a classe derivada.When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Herdado de 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() |
Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object. (Herdado de Object) |
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) |