summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Security/Policy/IRuntimeEvidenceFactory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Security/Policy/IRuntimeEvidenceFactory.cs')
-rw-r--r--src/mscorlib/src/System/Security/Policy/IRuntimeEvidenceFactory.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/mscorlib/src/System/Security/Policy/IRuntimeEvidenceFactory.cs b/src/mscorlib/src/System/Security/Policy/IRuntimeEvidenceFactory.cs
new file mode 100644
index 0000000000..98467fe367
--- /dev/null
+++ b/src/mscorlib/src/System/Security/Policy/IRuntimeEvidenceFactory.cs
@@ -0,0 +1,36 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+//
+
+using System;
+using System.Collections.Generic;
+
+namespace System.Security.Policy
+{
+ /// <summary>
+ /// IRuntimeEvidenceFactory is implemented by runtime types which the CLR knows how to delay
+ /// generate evidence for. It is used by the Evidence class to get evidence on demand when we first
+ /// need it.
+ /// </summary>
+ internal interface IRuntimeEvidenceFactory
+ {
+ /// <summary>
+ /// Object which the evidence generated by this factory is used for
+ /// </summary>
+ IEvidenceFactory Target { get; }
+
+ /// <summary>
+ /// Get the collection of evidence objects supplied by the factory itself, rather than by the
+ /// runtime.
+ /// </summary>
+ IEnumerable<EvidenceBase> GetFactorySuppliedEvidence();
+
+ /// <summary>
+ /// Generate a specific type of evidence for this object, returning null if the specified type of
+ /// evidence cannot be generated.
+ /// </summary>
+ EvidenceBase GenerateEvidence(Type evidenceType);
+ }
+}