Proprietà AddIns.DTE

Ottiene l'oggetto di estensibilità di primo livello.

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

Note

In Visual Studio, DTE rappresenta l'oggetto radice del modello di automazione, spesso chiamato "Applicazione" in altri modelli a oggetti.

Esempi

public void Example(DTE2 dte, AddIn addin)
{
   try
   {
      AddIns addins = addin.Collection;
      int c = addins.Count;
      if (c > 0) // there is an addin
         // Display the first (0) addins name.
         MessageBox.Show(addins.Item(1).Name);
      // Show the addins top-level extensibility.
      MessageBox.Show(addins.DTE.Name);
   }
   catch (Exception ex)
   {
      MessageBox.Show(ex.Message);
   }
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

AddIns Interfaccia

Spazio dei nomi EnvDTE

Altre risorse

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