Merge pull request #3433 from ntherning/fix-DoubleTest.Parse-assumes-en-US
[mono.git] / mcs / class / corlib / System.Security.AccessControl / FileSystemAccessRule.cs
index 4c40850a7fa615ff57dbcaeef7c458c5dc731b4f..7a369805379af86bc25ae8435ba594d0ea667a86 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.Security.Principal;
 
 namespace System.Security.AccessControl
 {
        public sealed class FileSystemAccessRule : AccessRule
        {
-               FileSystemRights rights;
-               
                public FileSystemAccessRule (IdentityReference identity,
                                             FileSystemRights fileSystemRights,
                                             AccessControlType type)
@@ -47,7 +43,7 @@ namespace System.Security.AccessControl
                public FileSystemAccessRule (string identity,
                                             FileSystemRights fileSystemRights,
                                             AccessControlType type)
-                       : this (new SecurityIdentifier (identity), fileSystemRights, InheritanceFlags.None, PropagationFlags.None, type)
+                       : this (new NTAccount (identity), fileSystemRights, InheritanceFlags.None, PropagationFlags.None, type)
                {
                }
 
@@ -56,9 +52,18 @@ namespace System.Security.AccessControl
                                             InheritanceFlags inheritanceFlags,
                                             PropagationFlags propagationFlags,
                                             AccessControlType type)
-                       : base (identity, (int) fileSystemRights, false, inheritanceFlags, propagationFlags, type)
+                       : this (identity, fileSystemRights, false, inheritanceFlags, propagationFlags, type)
+               {
+               }
+               
+               internal FileSystemAccessRule (IdentityReference identity,
+                                              FileSystemRights fileSystemRights,
+                                              bool isInherited,
+                                              InheritanceFlags inheritanceFlags,
+                                              PropagationFlags propagationFlags,
+                                              AccessControlType type)
+                       : base (identity, (int) fileSystemRights, isInherited, inheritanceFlags, propagationFlags, type)
                {
-                       this.rights = fileSystemRights;
                }
                
                public FileSystemAccessRule (string identity,
@@ -66,14 +71,13 @@ namespace System.Security.AccessControl
                                             InheritanceFlags inheritanceFlags,
                                             PropagationFlags propagationFlags,
                                             AccessControlType type)
-                       : this (new SecurityIdentifier (identity), fileSystemRights, inheritanceFlags, propagationFlags, type)
+                       : this (new NTAccount (identity), fileSystemRights, inheritanceFlags, propagationFlags, type)
                {
                }
                
                public FileSystemRights FileSystemRights {
-                       get { return rights; }
+                       get { return (FileSystemRights)AccessMask; }
                }
        }
 }
 
-#endif