~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric-updates

« back to all changes in this revision

Viewing changes to contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/SecurityDeclaration.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2009-02-18 08:40:51 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090218084051-gh8m6ukvokbwj7cf
Tags: 1.9.2+dfsg-1ubuntu1
* Merge from Debian Experimental (LP: #330519), remaining Ubuntu changes:
  + debian/control:
    - Update for Gnome# 2.24
    - Add libmono-cairo1.0-cil to build-deps to fool pkg-config check

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        public sealed class SecurityDeclaration : IRequireResolving, IAnnotationProvider, IReflectionVisitable {
36
36
 
37
37
                SecurityAction m_action;
 
38
                SecurityDeclarationReader m_reader;
38
39
                IDictionary m_annotations;
39
40
 
40
41
#if !CF_1_0 && !CF_2_0
77
78
                public SecurityDeclaration (SecurityAction action)
78
79
                {
79
80
                        m_action = action;
80
 
                        m_resolved = true;
 
81
                }
 
82
 
 
83
                internal SecurityDeclaration (SecurityAction action, SecurityDeclarationReader reader)
 
84
                {
 
85
                        m_action = action;
 
86
                        m_reader = reader;
81
87
                }
82
88
 
83
89
                public SecurityDeclaration Clone ()
102
108
 
103
109
                public bool Resolve ()
104
110
                {
105
 
                        throw new NotImplementedException ();
 
111
                        if (m_resolved)
 
112
                                return true;
 
113
 
 
114
                        if (m_reader == null)
 
115
                                return false;
 
116
 
 
117
                        SecurityDeclaration clone = m_reader.FromByteArray (m_action, m_blob, true);
 
118
                        if (!clone.Resolved)
 
119
                                return false;
 
120
 
 
121
                        m_action = clone.Action;
 
122
#if !CF_1_0 && !CF_2_0
 
123
                        m_permSet = clone.PermissionSet.Copy ();
 
124
#endif
 
125
                        m_resolved = true;
 
126
 
 
127
                        return true;
106
128
                }
107
129
 
108
130
                public void Accept (IReflectionVisitor visitor)