do not check order sequence if option /order was not used
[mono.git] / mcs / class / IKVM.Reflection / Reader / EventInfoImpl.cs
index a40baf5820d33272d9ce133ea3cadda071ec25e7..68d0bc011713ae44c3b03fc51cd08a7868c1d345 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2009 Jeroen Frijters
+  Copyright (C) 2009-2012 Jeroen Frijters
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -34,6 +34,7 @@ namespace IKVM.Reflection.Reader
                private readonly Type declaringType;
                private readonly int index;
                private bool isPublic;
+               private bool isNonPrivate;
                private bool isStatic;
                private bool flagsCached;
 
@@ -122,6 +123,18 @@ namespace IKVM.Reflection.Reader
                        }
                }
 
+               internal override bool IsNonPrivate
+               {
+                       get
+                       {
+                               if (!flagsCached)
+                               {
+                                       ComputeFlags();
+                               }
+                               return isNonPrivate;
+                       }
+               }
+
                internal override bool IsStatic
                {
                        get
@@ -136,8 +149,18 @@ namespace IKVM.Reflection.Reader
 
                private void ComputeFlags()
                {
-                       module.MethodSemantics.ComputeFlags(module, this.MetadataToken, out isPublic, out isStatic);
+                       module.MethodSemantics.ComputeFlags(module, this.MetadataToken, out isPublic, out isNonPrivate, out isStatic);
                        flagsCached = true;
                }
+
+               internal override bool IsBaked
+               {
+                       get { return true; }
+               }
+
+               internal override int GetCurrentToken()
+               {
+                       return this.MetadataToken;
+               }
        }
 }