private static void VerifyAccess(FileSecurityStateAccess access) { if ((access & ~FileSecurityStateAccess.AllAccess) != 0) { throw new ArgumentOutOfRangeException(nameof(access), Environment.GetResourceString("Arg_EnumIllegalVal")); } }
// 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; }
// 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; }
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); } }
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); } }
private static void VerifyAccess(FileSecurityStateAccess access) { if ((access & ~FileSecurityStateAccess.AllAccess) != 0) throw new ArgumentOutOfRangeException("access", Environment.GetResourceString("Arg_EnumIllegalVal")); }