IHostItemProviderContract2.GetHostObject Method

This API supports the Visual Studio Tools for Applications infrastructure and is not intended to be used directly from your code.

Returns an IContract that represents a host object in the host object model.

Namespace:  Microsoft.VisualStudio.Tools.Applications.Contract
Assembly:  Microsoft.VisualStudio.Tools.Applications.Contract.v9.0 (in Microsoft.VisualStudio.Tools.Applications.Contract.v9.0.dll)

Syntax

'Declaration
Function GetHostObject ( _
    objectType As String, _
    cookie As String _
) As IContract
'Usage
Dim instance As IHostItemProviderContract2 
Dim objectType As String 
Dim cookie As String 
Dim returnValue As IContract 

returnValue = instance.GetHostObject(objectType, _
    cookie)
IContract GetHostObject(
    string objectType,
    string cookie
)
IContract^ GetHostObject(
    String^ objectType, 
    String^ cookie
)
function GetHostObject(
    objectType : String, 
    cookie : String
) : IContract

Parameters

  • objectType
    Type: System.String

    The fully qualified name of the underlying type of the host item. The fully qualified name includes the namespace, but not the assembly name.

  • cookie
    Type: System.String

    An identifier that can be used to determine which object to return, if the host application provides multiple host items or host objects.

Return Value

Type: System.AddIn.Contract.IContract
An IContract that represents a host object in the host object model.

See Also

Reference

IHostItemProviderContract2 Interface

IHostItemProviderContract2 Members

Microsoft.VisualStudio.Tools.Applications.Contract Namespace