Share via


IListContract<C> 接口

定义

表示可按照索引单独访问的 IContract 对象的泛型集合。

generic <typename C>
 where C : IContractpublic interface class IListContract : System::AddIn::Contract::Collections::ICollectionContract<C>, System::AddIn::Contract::Collections::IEnumerableContract<C>
public interface IListContract<C> : System.AddIn.Contract.Collections.ICollectionContract<C>, System.AddIn.Contract.Collections.IEnumerableContract<C> where C : IContract
type IListContract<'C (requires 'C :> IContract)> = interface
    interface ICollectionContract<'C (requires 'C :> IContract)>
    interface IEnumerableContract<'C (requires 'C :> IContract)>
    interface IContract
Public Interface IListContract(Of C)
Implements ICollectionContract(Of C), IEnumerableContract(Of C)

类型参数

C

列表中的对象类型。 C 必须实现 IContract 接口。

实现

方法

AcquireLifetimeToken()

指定客户端在撤消此协定之前一直可以访问它。

(继承自 IContract)
Add(C)

IContract 添加到 ICollectionContract<C> 中。

(继承自 ICollectionContract<C>)
Clear()

ICollectionContract<C> 中移除所有元素。

(继承自 ICollectionContract<C>)
Contains(C)

返回一个值,该值指示指定的 IContract 是否在 ICollectionContract<C> 中。

(继承自 ICollectionContract<C>)
CopyTo(C[], Int32)

从目标数组的指定索引处开始,将整个 ICollectionContract<C> 复制到兼容的一维数组。

(继承自 ICollectionContract<C>)
GetCount()

返回 ICollectionContract<C> 中包含的元素的数目。

(继承自 ICollectionContract<C>)
GetEnumeratorContract()

返回一个循环访问集合的枚举器。

(继承自 IEnumerableContract<C>)
GetIsReadOnly()

返回一个值,该值指示 ICollectionContract<C> 是否为只读。

(继承自 ICollectionContract<C>)
GetItem(Int32)

返回指定索引处的元素。

GetRemoteHashCode()

返回 IContract 的哈希代码。

(继承自 IContract)
IndexOf(C)

返回 IListContract<C> 中的特定元素的索引。

Insert(Int32, C)

将元素插入 IListContract<C> 中的指定索引处。

QueryContract(String)

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

(继承自 IContract)
RemoteEquals(IContract)

指示指定的协定是否与此 IContract 相等。

(继承自 IContract)
RemoteToString()

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

(继承自 IContract)
Remove(C)

IContract 中移除第一次出现的特定 ICollectionContract<C>

(继承自 ICollectionContract<C>)
RemoveAt(Int32)

移除指定索引处的元素。

RevokeLifetimeToken(Int32)

指定客户端不再能够访问该协定。

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

替换指定索引处的元素。

适用于