Share via


RemoteObjectAdapter.RemoteCast Method

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

Casts the object represented by the current RemoteObjectAdapter to a specified type.

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

Syntax

'Declaration
Protected Function RemoteCast ( _
    canonicalName As String _
) As RemoteArgument
'Usage
Dim canonicalName As String 
Dim returnValue As RemoteArgument 

returnValue = Me.RemoteCast(canonicalName)
protected RemoteArgument RemoteCast(
    string canonicalName
)
protected:
RemoteArgument RemoteCast(
    String^ canonicalName
)
protected function RemoteCast(
    canonicalName : String
) : RemoteArgument

Parameters

  • canonicalName
    Type: System.String

    The canonical name of the type to cast the object to.

Return Value

Type: System.AddIn.Contract.RemoteArgument
A RemoteArgument that represents the result of the cast operation.

Exceptions

Exception Condition
InvalidCastException

The cast operation failed.

Remarks

A canonical name is a globally unique name, such as a fully qualified type name. Visual Studio Tools for Applications uses canonical names to help marshal types across the remoting boundary between a host application and an add-in. For more information, see Mapping Host Types to Proxy Types.

See Also

Reference

RemoteObjectAdapter Class

RemoteObjectAdapter Members

Microsoft.VisualStudio.Tools.Applications Namespace