RemoteObjectAdapter Class
This API supports the Visual Studio Tools for Applications infrastructure and is not intended to be used directly from your code.
Implements the contracts that represent remote objects across a versioning boundary.
Namespace: Microsoft.VisualStudio.Tools.Applications
Assembly: Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0 (in Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0.dll)
Syntax
'Declaration
Public Class RemoteObjectAdapter _
Inherits ContractAdapterBase _
Implements IRemoteObjectContract, IInteropObjectContract2, IContract, IAdapter
'Usage
Dim instance As RemoteObjectAdapter
public class RemoteObjectAdapter : ContractAdapterBase,
IRemoteObjectContract, IInteropObjectContract2, IContract, IAdapter
public ref class RemoteObjectAdapter : public ContractAdapterBase,
IRemoteObjectContract, IInteropObjectContract2, IContract, IAdapter
public class RemoteObjectAdapter extends ContractAdapterBase implements IRemoteObjectContract, IInteropObjectContract2, IContract, IAdapter
Remarks
This class implements IRemoteObjectContract, whose purpose is to expose the IRemoteTypeContract. The identity of the object is maintained through implementation of IContract.
Callers pass in a Type object that represents the type to be reflected and an actual object that implements that type. The reflected type can be an interface or abstract type that is more limited in functionality than the real object being invoked. The method signatures on the reflected type can expose only those objects that can be passed in a RemoteArgument (that is, other contracts or intrinsic types). This type is passed to the RemoteTypeAdapter.
This object also supports the IAdapter interface, so that a RemoteTypeAdapter can interact with it and use it in the various Invoke methods.
The Coerce methods are worthy of note. IAdapter is implemented explicitly. The Coerce methods then call virtual protected methods on the class. The default implementation then calls internal static methods on this class. This approach enables other adapters to re-use the default implementation of these methods.
Inheritance Hierarchy
System.Object
System.MarshalByRefObject
System.AddIn.Pipeline.ContractBase
Microsoft.VisualStudio.Tools.Applications.ContractAdapterBase
Microsoft.VisualStudio.Tools.Applications.RemoteObjectAdapter
Microsoft.VisualStudio.Tools.Applications.RemoteDelegateAdapter
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.