SolutionConfiguration2.DTE Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Üst düzey genişletilebilirlik nesnesini alır.
public:
property EnvDTE::DTE ^ DTE { EnvDTE::DTE ^ get(); };
public:
property EnvDTE::DTE ^ DTE { EnvDTE::DTE ^ get(); };
[System.Runtime.InteropServices.DispId(1)]
public EnvDTE.DTE DTE { [System.Runtime.InteropServices.DispId(1)] get; }
[<System.Runtime.InteropServices.DispId(1)>]
[<get: System.Runtime.InteropServices.DispId(1)>]
member this.DTE : EnvDTE.DTE
Public ReadOnly Property DTE As DTE
Özellik Değeri
Bir DTE nesnesi.
Uygulamalar
- Öznitelikler
Örnekler
Bu örnek, DTE ilk öğe için nesnesi aracılığıyla elde edilen etkin projenin adını görüntüler. Visual StudioBu örneği çalıştırmadan önce tümleşik geliştirme ortamında (IDE) bir proje açın.
Imports EnvDTE
Imports EnvDTE80
Sub SolutionConfigurationDTEExample(ByVal dte As DTE2)
Try
Dim builder As SolutionBuild = _
_applicationObject.Solution.SolutionBuild
Dim config As SolutionConfiguration2
config = CType(builder.SolutionConfigurations.Item(1) _
, SolutionConfiguration2)
MsgBox("The active solution project, obtained through the _
DTE object, is: " _
& config.DTE.ActiveSolutionProjects.ToString())
Catch ex As System.Exception
MsgBox(ex.ToString)
End Try
End Sub
using EnvDTE;
using EnvDTE80;
using System.Windows.Forms;
public void SolutionConfigurationDTEExample(DTE2 dte)
{
try
{
SolutionBuild builder =
_applicationObject.Solution.SolutionBuild;
SolutionConfiguration2 config;
config =
(SolutionConfiguration2)builder.SolutionConfigurations.Item(1);
MessageBox.Show("The active solution project, obtained through
the DTE object, is: " + config.DTE.ActiveSolutionProjects.ToString());
}
catch(SystemException ex)
{
MessageBox.Show(ex.ToString());
}
}
Açıklamalar
Visual Studio 'da nesne, DTE diğer nesne modellerinin genellikle "uygulama" çağrısını yaparken otomasyon modelinin köküdür.