Evidence.Merge(Evidence) Evidence.Merge(Evidence) Evidence.Merge(Evidence) Method

定義

指定した証拠セットを現在の証拠セットにマージします。Merges the specified evidence set into the current evidence set.

public:
 void Merge(System::Security::Policy::Evidence ^ evidence);
public void Merge (System.Security.Policy.Evidence evidence);
member this.Merge : System.Security.Policy.Evidence -> unit

パラメーター

evidence
Evidence Evidence Evidence

現在の証拠セットにマージされる証拠セット。The evidence set to be merged into the current evidence set.

例外

evidence パラメーターが、Evidence の有効なインスタンスではありません。The evidence parameter is not a valid instance of Evidence.

Lockedtrue であり、このメソッドを呼び出すコードに ControlEvidence がなく、evidence パラメーターに空ではないホスト リストが指定されています。Locked is true, the code that calls this method does not have ControlEvidence, and the evidence parameter has a host list that is not empty.

次のコード例の使用を示しています、Mergeメソッド。The following code example shows the use of the Merge method. この例が示されている例の一部、Evidenceクラス。This example is part of a larger example provided for the Evidence class.

Console::WriteLine( "\nMerge new evidence with the current evidence." );
array<Object^>^oa1 = {};
Site^ site = gcnew Site( "www.wideworldimporters.com" );
array<Object^>^oa2 = {url,site};
Evidence^ newEvidence = gcnew Evidence( oa1,oa2 );
myEvidence->Merge( newEvidence );
Console::WriteLine( "Evidence count = {0}", PrintEvidence( myEvidence ) );
Console.WriteLine("\nMerge new evidence with the current evidence.");
Object [] oa1 = {};
Site site = new Site("www.wideworldimporters.com");
Object [] oa2 = { url, site };
Evidence newEvidence = new Evidence(oa1, oa2);
myEvidence.Merge(newEvidence);
Console.WriteLine("Evidence count = " + PrintEvidence(myEvidence).ToString());
Console.WriteLine(ControlChars.Lf & "Merge new evidence with the current evidence.")
Dim oa1() As [Object]
Dim site As New Site("www.wideworldimporters.com")
Dim oa2 As [Object]() = {url, site}
Dim newEvidence As New Evidence(oa1, oa2)
myEvidence.Merge(newEvidence)

Console.WriteLine(("Evidence count = " & PrintEvidence(myEvidence).ToString()))

注釈

指定した証拠セット内の各証拠オブジェクトは、元の設定に従って、現在の証拠セットのアセンブリとホストのセットに追加されます。Each evidence object in the specified evidence set is added to the assembly and host sets of the current evidence set, according to the sets from which it came.

注意

このメソッドでは、証拠の重複する型を追加できないようにするためのチェックは実行されません。This method does not perform a check to prevent adding duplicate types of evidence. アセンブリおよびホスト証拠オブジェクトの多くは、同時に存在できます。Many assembly and host evidence objects can exist at the same time.

セキュリティ

SecurityPermission
証拠を操作する機能の場合にLockedtrueevidenceパラメーターが空でないホスト リスト。for the ability to manipulate evidence when Locked is true and the evidence parameter has a host list that is not empty. 関連付けられた列挙体。 ControlEvidenceAssociated enumeration: ControlEvidence

適用対象