Merge pull request #3528 from BrzVlad/fix-sgen-check-before-collections
[mono.git] / mcs / class / System / System.Security.AccessControl / SemaphoreAccessRule.cs
index a885b7db0264c7e16a14635b1028de366d00a80d..c9754ea29997238d897cbc86e023eda7b1852677 100644 (file)
@@ -26,8 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.Runtime.InteropServices;
 using System.Security.Principal;
 
@@ -35,29 +33,24 @@ namespace System.Security.AccessControl {
        [ComVisible (false)]
        public sealed class SemaphoreAccessRule : AccessRule
        {
-               SemaphoreRights semaphoreRights;
-               
                public SemaphoreAccessRule (IdentityReference identity,
-                                           SemaphoreRights semaphoreRights,
+                                           SemaphoreRights eventRights,
                                            AccessControlType type)
+                       : base (identity, (int)eventRights, false, InheritanceFlags.None, PropagationFlags.None, type)
                {
-                       this.semaphoreRights = semaphoreRights;
                }
 
                public SemaphoreAccessRule (string identity,
-                                           SemaphoreRights semaphoreRights,
+                                           SemaphoreRights eventRights,
                                            AccessControlType type)
+                       : this (new NTAccount (identity), eventRights, type)
                {
-                       this.semaphoreRights = semaphoreRights;
                }
                
                public SemaphoreRights SemaphoreRights
                {
-                       get {
-                               return(semaphoreRights);
-                       }
+                       get { return (SemaphoreRights)AccessMask; }
                }
        }
 }
 
-#endif