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.
Assembly: System.AddIn.Contract (in System.AddIn.Contract.dll)
Thetype exposes the following members.
|AcquireLifetimeToken||Specifies that the contract is accessible to a client until the client revokes the contract. (Inherited from IContract.)|
|Add||Adds an object to an collection.|
|Clear||Removes all objects from an collection.|
|Contains||Determines whether a specific item is in an collection.|
|GetCount||Gets the number of items in an collection.|
|GetEnumeratorContract||Returns an enumerator that iterates through an collection.|
|GetIsReadOnly||Determines whether an collection is read-only.|
|GetItem||Returns the item at the specified index of an collection.|
|GetRemoteHashCode||Returns a hash code for the IContract. (Inherited from IContract.)|
|IndexOf||Returns the index of a specific item in an IListContract<C> collection.|
|Insert||Inserts an item at the specified index in an collection.|
|QueryContract||Returns a contract that is implemented by this contract. (Inherited from IContract.)|
|RemoteEquals||Indicates whether the specified contract is equal to this IContract. (Inherited from IContract.)|
|RemoteToString||Returns a string representation of the current IContract. (Inherited from IContract.)|
|Remove||Removes an item from an collection of a specified type.|
|RemoveAt||Removes the item at the specified index in an collection.|
|RevokeLifetimeToken||Specifies that the contract is no longer accessible to a client. (Inherited from IContract.)|
|SetItem||Sets the item at the specified index in an collection.|
The CollectionAdapters class uses an interface to pass collections, in both directions, between the host and the add-in. It is recommended that you use the CollectionAdapters class instead of using this class directly in your code. For an example, see Walkthrough: Passing Collections Between Hosts and Add-Ins.
This class can be used to pass objects by reference between application domains because the objects are not serialized.
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.