Bewerken

Delen via


Evidence.AddAssemblyEvidence<T>(T) Method

Definition

Adds an evidence object of the specified type to the assembly-supplied evidence list.

public:
generic <typename T>
 where T : System::Security::Policy::EvidenceBase void AddAssemblyEvidence(T evidence);
public void AddAssemblyEvidence<T> (T evidence) where T : System.Security.Policy.EvidenceBase;
[System.Runtime.InteropServices.ComVisible(false)]
public void AddAssemblyEvidence<T> (T evidence) where T : System.Security.Policy.EvidenceBase;
member this.AddAssemblyEvidence : 'T -> unit (requires 'T :> System.Security.Policy.EvidenceBase)
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.AddAssemblyEvidence : 'T -> unit (requires 'T :> System.Security.Policy.EvidenceBase)
Public Sub AddAssemblyEvidence(Of T As EvidenceBase) (evidence As T)

Type Parameters

T

The type of the object in evidence.

Parameters

evidence
T

The assembly evidence to add.

Attributes

Exceptions

evidence is null.

Evidence of type T is already in the list.

evidence is not serializable.

Remarks

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.

Applies to