Defines the set of information that constitutes input to security policy decisions. This class cannot be inherited.
Assembly: mscorlib (in mscorlib.dll)
Thetype exposes the following members.
|Evidence()||Initializes a new empty instance of the class.|
|Evidence(Evidence)||Initializes a new instance of the class from a shallow copy of an existing one.|
|Evidence(EvidenceBase, EvidenceBase)||Initializes a new instance of the class from multiple sets of host and assembly evidence.|
|Evidence(Object, Object)||Obsolete. Initializes a new instance of the class from multiple sets of host and assembly evidence.|
|Count||Obsolete. Gets the number of evidence objects in the evidence set.|
|IsReadOnly||Gets a value indicating whether the evidence set is read-only.|
|IsSynchronized||Gets a value indicating whether the evidence set is thread-safe.|
|Locked||Gets or sets a value indicating whether the evidence is locked.|
|SyncRoot||Gets the synchronization root.|
|AddAssembly||Obsolete. Adds the specified assembly evidence to the evidence set.|
|AddAssemblyEvidence(T)||Adds an evidence object of the specified type to the assembly-supplied evidence list.|
|AddHost||Obsolete. Adds the specified evidence supplied by the host to the evidence set.|
|AddHostEvidence(T)||Adds host evidence of the specified type to the host evidence collection.|
|Clear||Removes the host and assembly evidence from the evidence set.|
|Clone||Returns a duplicate copy of this evidence object.|
|CopyTo||Obsolete. Copies evidence objects to an Array.|
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|GetAssemblyEnumerator||Enumerates evidence provided by the assembly.|
|GetAssemblyEvidence(T)||Gets assembly evidence of the specified type from the collection.|
|GetEnumerator||Obsolete. Enumerates all evidence in the set, both that provided by the host and that provided by the assembly.|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetHostEnumerator||Enumerates evidence supplied by the host.|
|GetHostEvidence(T)||Gets host evidence of the specified type from the collection.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|Merge||Merges the specified evidence set into the current evidence set.|
|RemoveType||Removes the evidence for a given type from the host and assembly enumerations.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|AsParallel()||Overloaded. Enables parallelization of a query. (Defined by ParallelEnumerable.)|
|AsParallel()||Overloaded. (Defined by ParallelEnumerable.)|
|AsQueryable()||Overloaded. Converts an IEnumerable to an IQueryable. (Defined by Queryable.)|
|AsQueryable()||Overloaded. (Defined by Queryable.)|
|Cast(TResult)()||Overloaded. Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)|
|Cast(TResult)()||Overloaded. (Defined by Enumerable.)|
|OfType(TResult)()||Overloaded. Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)|
|OfType(TResult)()||Overloaded. (Defined by Enumerable.)|
Common forms of evidence include signatures and location of origin of code, but can potentially be anything. Objects of any type that are recognized by security policy represent evidence.
Security policy is composed of code groups; a particular assembly (the basic unit of code for granting security permissions) is a member of a code group if it satisfies the code group's membership condition. Evidence is the set of inputs to policy that membership conditions use to determine to which code groups an assembly belongs.
The class is a collection (see ICollection) that holds a set of objects that represent evidence. This class holds two sets that correspond to the source of the evidence: host evidence and assembly evidence.
Policy can get evidence from two different sources when evaluating permissions for code.
Host evidence is provided by the host, and can only be provided by hosts that have been granted the ControlEvidence permission. Typically, this is evidence of the origin of the code and digital signatures on the assembly. Evidence about origin typically includes Url, Site, and Zone evidence. Signatures refer to software publisher (AuthentiCode X.509v3 signature) and strong name identities. Both kinds of digital signature-based identity are built into the assembly, but must be validated and passed to policy by the host; when loaded, the security system verifies the signature. The system then creates the appropriate evidence and passes it to policy only if the corresponding signature is valid.
Assembly evidence is part of the assembly itself. Developers or administrators can attach custom evidence to the assembly to extend the set of evidence for policy. Assembly evidence can only be added at the time of assembly generation, which occurs before the assembly is signed. The default policy of the security system ignores assembly-provided evidence, but policy can be extended to accept it.