Merge pull request #3528 from BrzVlad/fix-sgen-check-before-collections
[mono.git] / mcs / class / System / System.Security.AccessControl / SemaphoreAuditRule.cs
index 2bcf86766555faf324bfc8532abfb241dd5f961b..acc495ce45d1508752dcdf4a1700a2c322c40131 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.Runtime.InteropServices;
 using System.Security.Principal;
 
 namespace System.Security.AccessControl {
        [ComVisible (false)]
        public sealed class SemaphoreAuditRule
-#if !TARGET_JVM
                : AuditRule
-#endif
        {
-               SemaphoreRights semaphoreRights;
-               
                public SemaphoreAuditRule (IdentityReference identity,
-                                          SemaphoreRights semaphoreRights,
+                                          SemaphoreRights eventRights,
                                           AuditFlags flags)
-                       : base (identity, 0, false, InheritanceFlags.None, PropagationFlags.None, flags)
+                       : base (identity, (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, flags)
                {
-                       this.semaphoreRights = semaphoreRights;
                }
                
-               public SemaphoreRights SemaphoreRights
-               {
-                       get {
-                               return(semaphoreRights);
-                       }
+               public SemaphoreRights SemaphoreRights {
+                       get { return (SemaphoreRights)AccessMask; }
                }
        }
 }
 
-#endif