Proprietà Breakpoint.DTE

Ottiene l'oggetto estensibilità di primo livello.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.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 DTE proprietà.

Per verificare questa proprietà:

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

  2. eseguire il componente aggiuntivo.

public static void DTE(DTE 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 Test: ");
    owp.Activate();

    // dte is a reference to the DTE 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);
}
' Set a breakpoint in the target application. Run the application in the 
' debug mode.When the program stops at the breakpoint, run the add-in. 
Shared Sub DTEProperty(ByRef dte As EnvDTE.DTE)
    Dim DTEProp As DTE
    DTEProp = dte.Debugger.Breakpoints.Item(1).DTE
    MessageBox.Show("Edition of the environment: " + DTEProp.Edition)
End Sub

Sicurezza di .NET Framework

Vedere anche

Riferimenti

Breakpoint Interfaccia

Spazio dei nomi EnvDTE

Altre risorse

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