IListContract<'T> Interface

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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.

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

type IListContract<'T> = 
    interface
        interface IContract
    end

Type Parameters

T

The contract type of the objects in the list.

NameDescription
System_CAPS_pubmethodAcquireLifetimeToken()

Specifies that the contract is accessible to a client until the client revokes the contract.(Inherited from IContract.)

System_CAPS_pubmethodAdd('T)

Adds an object to an IListContract<'T> collection.

System_CAPS_pubmethodClear()

Removes all objects from an IListContract<'T> collection.

System_CAPS_pubmethodContains('T)

Determines whether a specific item is in an IListContract<'T> collection.

System_CAPS_pubmethodGetCount()

Gets the number of items in an IListContract<'T> collection.

System_CAPS_pubmethodGetEnumeratorContract()

Returns an enumerator that iterates through an IListContract<'T> collection.

System_CAPS_pubmethodGetIsReadOnly()

Determines whether an IListContract<'T> collection is read-only.

System_CAPS_pubmethodGetItem(Int32)

Returns the item at the specified index of an IListContract<'T> collection.

System_CAPS_pubmethodGetRemoteHashCode()

Returns a hash code for the IContract.(Inherited from IContract.)

System_CAPS_pubmethodIndexOf('T)

Returns the index of a specific item in an IListContract<'C> collection.

System_CAPS_pubmethodInsert(Int32, 'T)

Inserts an item at the specified index in an IListContract<'T> collection.

System_CAPS_pubmethodQueryContract(String)

Returns a contract that is implemented by this contract.(Inherited from IContract.)

System_CAPS_pubmethodRemoteEquals(IContract)

Indicates whether the specified contract is equal to this IContract.(Inherited from IContract.)

System_CAPS_pubmethodRemoteToString()

Returns a string representation of the current IContract.(Inherited from IContract.)

System_CAPS_pubmethodRemove('T)

Removes an item from an IListContract<'T> collection of a specified type.

System_CAPS_pubmethodRemoveAt(Int32)

Removes the item at the specified index in an IListContract<'T> collection.

System_CAPS_pubmethodRevokeLifetimeToken(Int32)

Specifies that the contract is no longer accessible to a client.(Inherited from IContract.)

System_CAPS_pubmethodSetItem(Int32, 'T)

Sets the item at the specified index in an IListContract<'T> collection.

The CollectionAdapters class uses an IListContract<'T> 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.

.NET Framework
Available since 3.5
Return to top
Show: