ContractAdapter Class

Provides methods for sharing and readapting add-ins.

System.Object
  System.AddIn.Pipeline.ContractAdapter

Namespace:  System.AddIn.Pipeline
Assembly:  System.AddIn (in System.AddIn.dll)

public static class ContractAdapter

The ContractAdapter type exposes the following members.

  NameDescription
Public methodStatic memberContractToViewAdapter<TView>(ContractHandle, PipelineStoreLocation)Obtains a host view of an add-in if a suitable host-side adapter is found at a location specified by a value from the PipelineStoreLocation enumeration.
Public methodStatic memberContractToViewAdapter<TView>(ContractHandle, String)Obtains a host view of an add-in if a suitable host-side adapter is found at a location specified by a path.
Public methodStatic memberViewToContractAdapterGets the handle to the contract for a provided host view of an add-in.
Top

You can use this class to share an add-in with another host that does not have the same pipeline to that add-in (particularly, another host that does not have the same host view of the add-in).

If you need to adapt an activated add-in from its host view to the contract, use the ViewToContractAdapter method.

If you have an instance of the contract and need to convert it to the host view, use the ContractToViewAdapter method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft