Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Evidence::AddHostEvidence<T> Method (T)

.NET Framework (current version)
 

Adds host evidence of the specified type to the host evidence collection.

Namespace:   System.Security.Policy
Assembly:  mscorlib (in mscorlib.dll)

public:
generic<typename T>
where T : EvidenceBase
[ComVisibleAttribute(false)]
void AddHostEvidence(
	T evidence
)

Parameters

evidence
Type: T

The host evidence to add.

Type Parameters

T

The type of the object in evidence.

Exception Condition
ArgumentNullException

evidence is null.

InvalidOperationException

Evidence of type T is already in the list.

Legacy evidence, that is, evidence that is not derived from EvidenceBase, cannot be added. Only evidence that is derived from EvidenceBase can be added. This method does not allow you to add evidence if evidence of that type already exists in the assembly list.

.NET Framework
Available since 4.0
Return to top
Show:
© 2017 Microsoft