[Serializable] |
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 Evidence 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.
ctor #1 | Overloaded:.ctor() Default constructor. This constructor is called by derived class constructors to initialize state in this type.Initializes a new empty instance of the Evidence class. |
ctor #2 | Overloaded:.ctor(Evidence evidence) Initializes a new instance of the Evidence class from a shallow copy of an existing one. |
ctor #3 | Overloaded:.ctor(object[] hostEvidence, object[] assemblyEvidence) Initializes a new instance of the Evidence class from multiple sets of host and assembly evidence. |
Count | Read-only Gets the number of evidence objects in the evidence set. |
IsReadOnly | Read-only Gets a value indicating whether the evidence set is read-only. |
IsSynchronized | Read-only Gets a value indicating whether the evidence set is thread-safe. |
Locked | Read-write Gets or sets a value indicating whether the evidence is locked. |
SyncRoot | Read-only Gets the synchronization root. |
AddAssembly | Adds the specified assembly evidence to the evidence set. |
AddHost | Adds the specified evidence supplied by the host to the evidence set. |
CopyTo | Copies evidence objects to an Array. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetAssemblyEnumerator | Enumerates evidence provided by the assembly. |
GetEnumerator | Enumerates all evidence in the set, both that provided by the host and that provided by the assembly. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetHostEnumerator | Enumerates evidence supplied by the host. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
Merge | Merges the specified evidence set into the current evidence set. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public Evidence(); |
public Evidence(Evidence( |
evidence
Exception Type | Condition |
---|---|
ArgumentException | The evidence parameter is not a valid instance of Evidence. |
public Evidence(object[] hostEvidence, object[] assemblyEvidence( |
hostEvidence
assemblyEvidence
public int Count {get;}
|
public bool IsReadOnly {get;}
|
public bool IsSynchronized {get;}
|
public bool Locked {get; set;}
|
public object SyncRoot {get;}
|
public void AddAssembly( |
id
public void AddHost( |
id
Exception Type | Condition |
---|---|
SecurityException | Evidence.Locked is true and the code that calls this method does not have SecurityPermissionFlag.ControlEvidence. |
array
index
~Evidence(); |
public IEnumerator GetAssemblyEnumerator(); |
public IEnumerator GetEnumerator(); |
public virtual int GetHashCode(); |
public IEnumerator GetHostEnumerator(); |
public Type GetType(); |
protected object MemberwiseClone(); |
public void Merge( |
evidence
Exception Type | Condition |
---|---|
ArgumentException | The evidence parameter is not a valid instance of Evidence. |
SecurityException | Evidence.Locked is true, the code that calls this method does not have SecurityPermissionFlag.ControlEvidence, and the evidence parameter has a host list that is not empty. |
public virtual string ToString(); |