Aracılığıyla paylaş


Expression.DTE Özellik

Üst düzey bir geniþletilebilirlik nesnesi alır.

Ad alanı:  EnvDTE
Derleme:  EnvDTE (EnvDTE.dll içinde)

Sözdizimi

'Bildirim
ReadOnly Property DTE As DTE
    Get
DTE DTE { get; }
property DTE^ DTE {
    DTE^ get ();
}
abstract DTE : DTE
function get DTE () : DTE

Özellik Değeri

Tür: EnvDTE.DTE
DTE nesnesi

Açıklamalar

Visual Studio, DTE nesne olan otomasyon modeli, diğer nesne modelleri genellikle kök arama "uygulama."

Örnekler

Aşağıdaki örnek, nasıl kullanılacağını gösterir DTE özelliği.

Bu özellik test etmek için:

  1. Bir kesme noktası hedef uygulamanızda ayarlayın.

  2. Hedef uygulama hata ayıklama modunda çalıştırın.

  3. Uygulama kesme noktasında durur, eklentiyi çalıştırın.

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();

    EnvDTE.Expression exp = dte.Debugger.GetExpression("tempC", true, 1);
    owp.OutputString("Edition of the environment: " + exp.DTE.Edition);
}
Shared Sub DTEProperty(ByRef dte As EnvDTE.DTE)
    Dim exp As EnvDTE.Expression = dte.Debugger.GetExpression("tempC", True, 1)
    MessageBox.Show("Edition of the environment: " + exp.DTE.Edition, _
                    "Expression Test - DTE Property")
End Sub

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Expression Arabirim

EnvDTE Ad Alanı

Diğer Kaynaklar

Nasıl Yapılır: derlemek ve otomasyon nesne modeli kod örnekleri çalıştırma