แก้ไข

แชร์ผ่าน


System.AddIn.Contract Namespace

Contains interfaces and structures that provide the basis for communication between components that are updated independently.

Structs

RemoteArgument

Represents an instance of a type that can be passed across process and application domain boundaries.

SerializableObjectData

Provides information about a serializable object.

Interfaces

IContract

Represents the base interface for all contracts that are used for communication between components that are updated independently.

IEnumeratorContract<T>

Enumerates the elements in an IListContract<T> collection.

IExecutorExtensionContract

Defines an interface that host applications can implement to extend add-in executors.

IListContract<T>

Represents a generic list of types that are defined by a contract and are used to pass collections of that contract type between a host and an add-in.

INativeHandleContract

Provides access to a window's handle (Hwnd) from native code.

IProfferServiceContract

Enables clients to provide custom services to components on which the contract is implemented.

ISerializableObjectContract

Defines a contract that provides information about a serializable object.

IServiceProviderContract

Defines a mechanism for retrieving a service contract from a component.

Enums

RemoteArgumentKind

Specifies the kind of argument that a RemoteArgument represents.

Remarks

The System.AddIn.Contract namespace defines a set of interfaces and structures that can be used by independently updated components, such as an application and an add-in, to communicate. Components can use the interfaces and structures in the System.AddIn.Contract namespace to communicate across process or application domain boundaries, or to communicate with other components in the same process or application domain.

The interfaces in the System.AddIn.Contract namespace are also called contracts. All contracts derive from the IContract interface. The purpose that IContract serves for components created using the .NET Framework is similar to the purpose that the IUnknown interface serves for components created using COM. To determine whether an object implements a particular contract, components use the QueryContract method.

The System.AddIn.Contract.Automation and System.AddIn.Contract.Collections namespaces contain additional contracts that supplement the System.AddIn.Contract namespace. The System.AddIn.Contract.Automation namespace contains contracts that components use to access type information and invoke type members. The System.AddIn.Contract.Collections namespace contains contracts that define collections of IContract and RemoteArgument objects.

See also