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
DTE DTE { get; }
property DTE^ DTE {
    DTE^ get ();
}
abstract DTE : DTE
function get DTE () : DTE

Valore proprietà

Tipo: EnvDTE.DTE
In DTE oggetto.

Note

in Visual Studio, DTE l'oggetto è la radice del modello di automazione, che altri modelli a oggetti spesso chiamano “applicazione„.

Esempi

Nell'esempio seguente viene illustrato come utilizzare la proprietà DTE.

Per verificare questa 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