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> 集合中的指定之索引處設定項目。

適用於