<PackageReference Include="System.Security.Permissions" Version="4.6.0-preview3.19128.7" />

Evidence

public sealed class Evidence : ICollection, IEnumerable
Defines the set of information that constitutes input to security policy decisions. This class cannot be inherited.
public int Count { get; }

Gets the number of evidence objects in the evidence set.

public bool IsReadOnly { get; }

Gets a value indicating whether the evidence set is read-only.

public bool IsSynchronized { get; }

Gets a value indicating whether the evidence set is thread-safe.

public bool Locked { get; set; }

Gets or sets a value indicating whether the evidence is locked.

public object SyncRoot { get; }

Gets the synchronization root.

public Evidence()

Initializes a new empty instance of the Evidence class.

public Evidence(object[] hostEvidence, object[] assemblyEvidence)

Initializes a new instance of the Evidence class from multiple sets of host and assembly evidence.

public Evidence(Evidence evidence)

Initializes a new instance of the Evidence class from a shallow copy of an existing one.

public Evidence(EvidenceBase[] hostEvidence, EvidenceBase[] assemblyEvidence)

Initializes a new instance of the Evidence class from multiple sets of host and assembly evidence.

public void AddAssembly(object id)

Adds the specified assembly evidence to the evidence set.

public void AddAssemblyEvidence<T>(T evidence) where T : EvidenceBase

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

public void AddHost(object id)

Adds the specified evidence supplied by the host to the evidence set.

public void AddHostEvidence<T>(T evidence) where T : EvidenceBase

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

public void Clear()

Removes the host and assembly evidence from the evidence set.

public Evidence Clone()

Returns a duplicate copy of this evidence object.

public void CopyTo(Array array, int index)

Copies evidence objects to an Array.

Enumerates evidence provided by the assembly.

public T GetAssemblyEvidence<T>() where T : EvidenceBase

Gets assembly evidence of the specified type from the collection.

Enumerates all evidence in the set, both that provided by the host and that provided by the assembly.

Enumerates evidence supplied by the host.

public T GetHostEvidence<T>() where T : EvidenceBase

Gets host evidence of the specified type from the collection.

public void Merge(Evidence evidence)

Merges the specified evidence set into the current evidence set.

public void RemoveType(Type t)

Removes the evidence for a given type from the host and assembly enumerations.