Export (0) Print
Expand All

IRemoteObjectContract.RemoteCast Method

Casts the object identified by the current IRemoteObjectContract to a specified type.

Namespace:  System.AddIn.Contract.Automation
Assembly:  System.AddIn.Contract (in System.AddIn.Contract.dll)

RemoteArgument RemoteCast(
	string canonicalName
)

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.

A canonical name is a globally unique name, such as a GUID. Strings in the format <assembly name>, <fully qualified type name> are recommended. An example of the recommended format of a canonical name is "ShapeApp, Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.Application".

The canonical name for a type cannot change after a type is published in a component. Changing the canonical name of a type in a future version of a component breaks compatibility between the component and clients that are already using the type.

It is recommended that RemoteCast implementations throw an InvalidCastException if the cast operation fails.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5

Community Additions

ADD
Show:
© 2014 Microsoft