Proprietà Breakpoint2.DTE

Ottiene l'oggetto estensibilità di primo livello.

Spazio dei nomi:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Sintassi

'Dichiarazione
ReadOnly Property DTE As DTE
    Get
DTE DTE { get; }
property DTE^ DTE {
    DTE^ get ();
}
abstract DTE : DTE
function get DTE () : DTE

Valore proprietà

Tipo: EnvDTE.DTE
Un oggetto DTE.

Implementa

Breakpoint.DTE

Note

In Visual Studio l'oggetto DTE è la radice del modello di automazione. In altri modelli a oggetti viene spesso chiamato "Applicazione".

Esempi

Nell'esempio riportato di seguito viene illustrato come utilizzare la proprietà DTE.

Per verificare la proprietà:

  1. Impostare un punto di interruzione nell'applicazione di destinazione.

  2. Eseguire il componente aggiuntivo.

public static void DTE(EnvDTE80.DTE2 dte)
{
    // Setup debug Output window.
    Window w = (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
    w.Visible = true;
    OutputWindow ow = (OutputWindow)w.Object;
    OutputWindowPane owp = ow.OutputWindowPanes.Add("DTE property: ");
    owp.Activate();

    //dte is a reference to the DTE2 object passed to you by the
    //OnConnection method that you implement when you create an Add-in.
    DTE DTEProp = dte.Debugger.Breakpoints.Item(1).DTE;
    owp.OutputString("Edition of the environment: " + DTEProp.Edition);
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

Breakpoint2 Interfaccia

Overload DTE

Spazio dei nomi EnvDTE80

Altre risorse

Procedura: compilare ed eseguire gli esempi di codice del modello a oggetti di automazione