语言

IListContract<T> 接口

定义

表示协定定义的类型的泛型列表,用于在主机和外接程序之间传递该协定类型的集合。

generic <typename T>
public interface class IListContract : System::AddIn::Contract::IContract
public interface IListContract<T> : System.AddIn.Contract.IContract
type IListContract<'T> = interface
    interface IContract
Public Interface IListContract(Of T)
Implements IContract

类型参数

T

列表中的对象的协定类型。

实现

注解

该 CollectionAdapters 类使用 IListContract<T> 接口在主机和外接程序之间双向传递集合。 建议在 CollectionAdapters 代码中使用类,而不是直接在代码中使用此类。 有关示例,请参阅 演练:在主机和外接程序之间传递集合。

此类可用于通过应用程序域之间的引用传递对象,因为对象未序列化。

方法

名称 说明
AcquireLifetimeToken()

指定在客户端吊销协定之前,协定可供客户端访问。

(继承自 IContract)
Add(T)

将对象添加到 IListContract<T> 集合。

Clear()

从 IListContract<T> 集合中删除所有对象。

Contains(T)

确定特定项是否在集合中 IListContract<T> 。

GetCount()

获取集合中的 IListContract<T> 项数。

GetEnumeratorContract()

返回循环访问集合的 IListContract<T> 枚举器。

GetIsReadOnly()

确定集合是否 IListContract<T> 为只读。

GetItem(Int32)

返回集合的指定索引处的 IListContract<T> 项。

GetRemoteHashCode()

返回 的 IContract哈希代码。

(继承自 IContract)
IndexOf(T)

返回集合中 IListContract<C> 特定项的索引。

Insert(Int32, T)

在集合中的指定索引处插入项 IListContract<T> 。

QueryContract(String)

返回由此协定实现的协定。

(继承自 IContract)
RemoteEquals(IContract)

指示指定的协定是否等于此 IContract协定。

(继承自 IContract)
RemoteToString()

返回当前 IContract字符串表示形式。

(继承自 IContract)
Remove(T)

从 IListContract<T> 指定类型的集合中删除项。

RemoveAt(Int32)

删除集合中指定索引处的 IListContract<T> 项。

RevokeLifetimeToken(Int32)

指定该协定不再可供客户端访问。

(继承自 IContract)
SetItem(Int32, T)

设置集合中指定索引处的 IListContract<T> 项。

适用于