GSF.Identity.UserInfo.LocalGroupExists C# (CSharp) Méthode

LocalGroupExists() public static méthode

Determines if local group exists.
was null. No was specified.
public static LocalGroupExists ( string groupName ) : bool
groupName string Group name to test for existence.
Résultat bool
        public static bool LocalGroupExists(string groupName)
        {
            if ((object)groupName == null)
                throw new ArgumentNullException(nameof(groupName));

            // Remove any irrelevant white space
            groupName = groupName.Trim();

            if (groupName.Length == 0)
                throw new ArgumentException("No group name was specified.", nameof(groupName));

            groupName = ValidateGroupName(groupName);

            if (Common.IsPosixEnvironment)
                return UnixUserInfo.LocalGroupExists(groupName);

            return WindowsUserInfo.LocalGroupExists(groupName);
        }