AppMetrics.AccessKeys.VerifyAccess C# (CSharp) Méthode

VerifyAccess() public static méthode

public static VerifyAccess ( string key ) : void
key string
Résultat void
        public static void VerifyAccess(string key)
        {
            if (!AppSettings.Instance.RequireAccessKey)
                return;
            if (string.IsNullOrWhiteSpace(key) || !IsAllowed(key))
                throw new ApplicationException("Wrong access key '" + key + "'");
        }