Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gac.cs « policy « security « system « mscorlib « referencesource « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 78f0eea16dd858ea58935ae48a0ef85fdcbdf6a8 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// ==++==
// 
//   Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// ==--==
// <OWNER>[....]</OWNER>
// 

//
// GacInstalled is an IIdentity representing whether or not an assembly is installed in the Gac
//

namespace System.Security.Policy {
    using System.Runtime.Remoting;
    using System;
    using System.Security;
    using System.Security.Util;
    using System.IO;
    using System.Collections;
    using GacIdentityPermission = System.Security.Permissions.GacIdentityPermission;
    using System.Runtime.CompilerServices;

    [Serializable]
    [System.Runtime.InteropServices.ComVisible(true)]
    public sealed class GacInstalled : EvidenceBase, IIdentityPermissionFactory
    {
        public GacInstalled()
        {
        }

        public IPermission CreateIdentityPermission( Evidence evidence )
        {
            return new GacIdentityPermission();
        }

        public override bool Equals(Object o)
        {
            return o is GacInstalled;
        }

        public override int GetHashCode()
        {
            return 0;
        }

        public override EvidenceBase Clone()
        {
            return new GacInstalled();
        }

        public Object Copy()
        {
            return Clone();
        }

        internal SecurityElement ToXml()
        {
            SecurityElement elem = new SecurityElement( this.GetType().FullName );
            elem.AddAttribute( "version", "1" );
            return elem;
        }

        public override String ToString()
        {
            return ToXml().ToString();
        }
    }
}