Пример #1
0
 private static void VerifyAccess(FileSecurityStateAccess access)
 {
     if ((access & ~FileSecurityStateAccess.AllAccess) != 0)
     {
         throw new ArgumentOutOfRangeException(nameof(access), Environment.GetResourceString("Arg_EnumIllegalVal"));
     }
 }
Пример #2
0
      // slight perf savings for trusted internal callers
      internal FileSecurityState(FileSecurityStateAccess access, String path, String canonicalizedPath)
      {
          VerifyAccess(access);
          VerifyPath(path);
          VerifyPath(canonicalizedPath);
 
          m_access = access;
          m_userPath = path;
          m_canonicalizedPath = canonicalizedPath;
      }
Пример #3
0
        // slight perf savings for trusted internal callers
        internal FileSecurityState(FileSecurityStateAccess access, String path, String canonicalizedPath)
        {
            VerifyAccess(access);
            VerifyPath(path);
            VerifyPath(canonicalizedPath);

            m_access            = access;
            m_userPath          = path;
            m_canonicalizedPath = canonicalizedPath;
        }
Пример #4
0
 internal FileSecurityState(FileSecurityStateAccess access, String path)
 {
     if (path == null)
     {
         throw new ArgumentNullException("path");
     }
     VerifyAccess(access);
     m_access = access;
     m_userPath = path;
     if (path.Equals(String.Empty, StringComparison.OrdinalIgnoreCase))
     {
         m_canonicalizedPath = String.Empty;
     }
     else
     {
         VerifyPath(path);
         m_canonicalizedPath = System.IO.Path.GetFullPathInternal(path);
     }
 }
Пример #5
0
 internal FileSecurityState(FileSecurityStateAccess access, String path)
 {
     if (path == null)
     {
         throw new ArgumentNullException(nameof(path));
     }
     VerifyAccess(access);
     m_access   = access;
     m_userPath = path;
     if (path.Equals(String.Empty, StringComparison.OrdinalIgnoreCase))
     {
         m_canonicalizedPath = String.Empty;
     }
     else
     {
         VerifyPath(path);
         m_canonicalizedPath = IO.Path.GetFullPath(path);
     }
 }
Пример #6
0
 private static void VerifyAccess(FileSecurityStateAccess access)
 {
     if ((access & ~FileSecurityStateAccess.AllAccess) != 0)
         throw new ArgumentOutOfRangeException("access", Environment.GetResourceString("Arg_EnumIllegalVal"));
 }