Evidence.AddHostEvidence<T>(T) Método


Agrega evidencia de host del tipo especificado a la colección de evidencias de host.Adds host evidence of the specified type to the host evidence collection.

generic <typename T>
 where T : System::Security::Policy::EvidenceBase void AddHostEvidence(T evidence);
public void AddHostEvidence<T> (T evidence) where T : System.Security.Policy.EvidenceBase;
member this.AddHostEvidence : 'T -> unit (requires 'T :> System.Security.Policy.EvidenceBase)
Public Sub AddHostEvidence(Of T As EvidenceBase) (evidence As T)

Parámetros de tipo


Tipo del objeto de evidence.The type of the object in evidence.



Evidencia de host que se va a agregar.The host evidence to add.



evidence es null.evidence is null.

La evidencia del tipo T ya está en la lista.Evidence of type T is already in the list.


La evidencia heredada, es decir, la evidencia que no se deriva de EvidenceBase, no se puede Agregar.Legacy evidence, that is, evidence that is not derived from EvidenceBase, cannot be added. Solo se puede Agregar la evidencia que se deriva de EvidenceBase.Only evidence that is derived from EvidenceBase can be added. Este método no permite agregar evidencias si la evidencia de ese tipo ya existe en la lista de ensamblados.This method does not allow you to add evidence if evidence of that type already exists in the assembly list.

Se aplica a