Proprietà Debugger.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 è 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. Aprire il progetto di destinazione ed eseguire il componente aggiuntivo.
public static void DTE(DTE dte)
{
    // Setup the 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 DTEProp = dte.Debugger.DTE;
    owp.OutputString("Edition of the environment: " + DTEProp.Edition);
}
Shared Sub DTE(ByRef dte As EnvDTE.DTE)
    MessageBox.Show("Edition of the environment: " + dte.Debugger.DTE.Edition, "Debugger Test - DTEProperty")
End Sub

Sicurezza di .NET Framework

Vedere anche

Riferimenti

Debugger Interfaccia

Spazio dei nomi EnvDTE

Altre risorse

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