ApplicationTrustCollection.AddRange 方法

定義

將某個範圍的 ApplicationTrust 物件複製到集合的結尾。

多載

AddRange(ApplicationTrust[])

將指定的 ApplicationTrust 陣列元素複製到集合的末端。

AddRange(ApplicationTrustCollection)

將指定 ApplicationTrustCollection 的元素複製到集合結尾。

AddRange(ApplicationTrust[])

將指定的 ApplicationTrust 陣列元素複製到集合的末端。

public:
 void AddRange(cli::array <System::Security::Policy::ApplicationTrust ^> ^ trusts);
public void AddRange (System.Security.Policy.ApplicationTrust[] trusts);
[System.Security.SecurityCritical]
public void AddRange (System.Security.Policy.ApplicationTrust[] trusts);
member this.AddRange : System.Security.Policy.ApplicationTrust[] -> unit
[<System.Security.SecurityCritical>]
member this.AddRange : System.Security.Policy.ApplicationTrust[] -> unit
Public Sub AddRange (trusts As ApplicationTrust())

參數

trusts
ApplicationTrust[]

ApplicationTrust 型別的陣列,包含要加入至集合的物件。

屬性

例外狀況

trustsnull

trust 中所指定的 ApplicationIdentityApplicationTrust 屬性為 null

備註

ApplicationTrust陣列中包含的 trusts 物件會附加至集合結尾。

若要移除您先前新增的應用程式信任範圍,請使用 RemoveRange 方法。

適用於

AddRange(ApplicationTrustCollection)

將指定 ApplicationTrustCollection 的元素複製到集合結尾。

public:
 void AddRange(System::Security::Policy::ApplicationTrustCollection ^ trusts);
public void AddRange (System.Security.Policy.ApplicationTrustCollection trusts);
[System.Security.SecurityCritical]
public void AddRange (System.Security.Policy.ApplicationTrustCollection trusts);
member this.AddRange : System.Security.Policy.ApplicationTrustCollection -> unit
[<System.Security.SecurityCritical>]
member this.AddRange : System.Security.Policy.ApplicationTrustCollection -> unit
Public Sub AddRange (trusts As ApplicationTrustCollection)

參數

trusts
ApplicationTrustCollection

ApplicationTrustCollection,含有要加入至集合的物件。

屬性

例外狀況

trustsnull

trust 中所指定的 ApplicationIdentityApplicationTrust 屬性為 null

備註

ApplicationTrust中包含的 trusts 物件會附加至集合結尾。

您可以使用 AddRange 方法來快速將另一個應用程式信任物件集合新增至集合,而不是使用 Add 方法手動將每個應用程式信任新增至集合。

若要移除您先前新增的應用程式信任範圍,請使用 RemoveRange 方法。

適用於