Share via


Transports Interface

A collection of Transport objects.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Syntax

'Declaration
<GuidAttribute("EA47C3D9-FD41-4402-BDC6-7F07D0C8E3FC")> _
Public Interface Transports _
    Inherits IEnumerable
[GuidAttribute("EA47C3D9-FD41-4402-BDC6-7F07D0C8E3FC")]
public interface Transports : IEnumerable
[GuidAttribute(L"EA47C3D9-FD41-4402-BDC6-7F07D0C8E3FC")]
public interface class Transports : IEnumerable
[<GuidAttribute("EA47C3D9-FD41-4402-BDC6-7F07D0C8E3FC")>]
type Transports =  
    interface 
        interface IEnumerable 
    end
public interface Transports extends IEnumerable

The Transports type exposes the following members.

Properties

  Name Description
Public property Count Gets a value indicating the number of objects in the Transports collection.
Public property DTE Gets the top-level extensibility object.
Public property Parent Gets the immediate parent object of a Transports collection, in this case the Debugger object.

Top

Methods

  Name Description
Public method GetEnumerator Gets an enumeration for items in a collection.
Public method Item Gets an indexed member of a Transports collection.

Top

Remarks

Note

When you record a macro and attach to a debugging process using the T-SQL debugging engine, the macro returns two separate references to the same engine name. For example, dbgeng(0) = transprt.Engines.Item("T-SQL") and dbgeng(1) = transprt.Engines.Item("T-SQL"). This happens because there are actually two underlying T-SQL debugging engines in Visual Studio: one for the SQL Server 2005 debugging engine, the other for the T-SQL debugging engine for SQL Server 2000 and SQL Server 7. They are both automatically referenced when attaching to a debugging engine process via the UI, but in automation code, they must each be referenced by using their unique identifier GUID. The GUID for SQL Server 2005 is {1202F5B4-3522-4149-BAD8-58B2079D704F}, and the GUID for the T-SQL debugging engine for SQL Server 2000 and SQL Server 7 is {5AF6F83C-B555-11D1-8418-00C04FA302A1}. So the above calls should be changed to dbgeng(0) = trans.Engines.Item("{1202F5B4-3522-4149-BAD8-58B2079D704F}") and dbgeng(1) = trans.Engines.Item("{1202F5B4-3522-4149-BAD8-58B2079D704F}") respectively.

Examples

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

Public Module Module1

    Sub ShowTransports()
        Dim dbg As EnvDTE80.Debugger2
        dbg = DTE.Debugger
        Dim strTransportList As String
        Dim transport As EnvDTE80.Transport

        For Each transport In dbg.Transports
            strTransportList = strTransportList + transport.Name & ", _
            " & transport.ID & VbCr
        Next
        MsgBox(strTransportList)
    End Sub
End Module

See Also

Reference

EnvDTE80 Namespace

Transport

Other Resources

Automation Object Model Chart