Proprietà Engine.Name

Ottiene il nome dell'oggetto Engine.

Spazio dei nomi:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Sintassi

'Dichiarazione
ReadOnly Property Name As String
    Get
string Name { get; }
property String^ Name {
    String^ get ();
}
abstract Name : string
function get Name () : String

Valore proprietà

Tipo: System.String
Stringa contenente il nome del modulo di gestione del debug.

Note

Nota

Quando si registra una macro associandovi un processo di debug mediante il motore di debug Transact-SQL, la macro restituisce due riferimenti distinti allo stesso nome di motore. Ad esempio, dbgeng(0) = transprt.Engines.Item("T-SQL") e dbgeng(1) = transprt.Engines.Item("T-SQL"). Ciò si verifica perché sono effettivamente due moduli di gestione di debug Transact-SQL sottostanti in Visual Studio: uno per il modulo di gestione di debug SQL Server 2005, l'altro per il modulo di gestione di debug Transact-SQL per SQL Server 2000 e SQL Server 7. Automaticamente viene fatto riferimento a entrambi durante l'associazione a un processo di motore di debug attraverso la UI, ma nel codice di automazione è necessario fare riferimento a ognuno mediante l'identificatore univoco GUID. Il GUID per SQL Server 2005 è {1202F5B4-3522-4149-BAD8-58B2079D704F}, mentre il GUID per il motore di debug Transact-SQL per SQL Server 2000 e SQL Server 7 è {5AF6F83C-B555-11D1-8418-00C04FA302A1}. Quindi, le suddette chiamate devono essere modificate rispettivamente in dbgeng(0) = trans.Engines.Item("{1202F5B4-3522-4149-BAD8-58B2079D704F}") edbgeng(1) = trans.Engines.Item("{1202F5B4-3522-4149-BAD8-58B2079D704F}").

Esempi

' Macro code.
Imports EnvDTE
Imports EnvDTE80
Imports System.Diagnostics
Imports Microsoft.VisualBasic.ControlChars

Public Module Module1

    Sub ShowDefaultEngines()
        Dim dbg As EnvDTE80.Debugger2
        dbg = DTE.Debugger

        dbg.HexDisplayMode = True

        Dim transport As EnvDTE80.Transport
        transport = dbg.Transports.Item("default")

        Dim engine As EnvDTE80.Engine
        Dim strEngineList As String
        For Each engine In transport.Engines
            strEngineList = strEngineList + engine.Name + ", " + _
            engine.ID + ", " + engine.AttachResult.ToString + NewLine
        Next
        MsgBox(strEngineList)
    End Sub
End Module

Sicurezza di .NET Framework

Vedere anche

Riferimenti

Engine Interfaccia

Spazio dei nomi EnvDTE80

Engines