summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Security/Policy/IRuntimeEvidenceFactory.cs
blob: 98467fe3676b56d6e18ae35004086b6622c5aabb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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);
    }
}