Export (0) Print
Expand All

Evidence.AddHostEvidence<T> Method

.NET Framework 4.6 and 4.5

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

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

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

Type Parameters

T

The type of the object in evidence.

Parameters

evidence
Type: T

The host evidence to add.

ExceptionCondition
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

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft