Proprietà BuildDependencies.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)
{
try
{
BuildDependencies bldDepends;
BuildDependency bldDependency = null;
// Get the BuildDependencies in open solution.
bldDepends = dte.Solution.SolutionBuild.BuildDependencies;
if (bldDepends.Count > 0) // assign the BuildDependency
bldDependency = bldDepends.Item(bldDepends.Count);
// Show the BuildDependency returned by the Item property.
MessageBox.Show(bldDependency.Project.Name);
// Show the BuildDependencies top-level object.
MessageBox.Show(bldDepends.DTE.Name);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Sicurezza di .NET Framework
- Attendibilità totale per il chiamante immediato. Impossibile utilizzare questo membro in codice parzialmente attendibile. Per ulteriori informazioni, vedere Utilizzo di librerie da codice parzialmente attendibile.
Vedere anche
Riferimenti
Altre risorse
Procedura: compilare ed eseguire gli esempi di codice del modello a oggetti di automazione