Evidence.Merge(Evidence) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Public Sub Merge (evidence As Evidence)
Parameters
- evidence
- Evidence
The evidence set to be merged into the current evidence set.
Exceptions
The evidence
parameter is not a valid instance of 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.
Examples
The following code example shows the use of the Merge method. 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()))
Remarks
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.
Note
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.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기