AppMetrics.AccessKeys.VerifyAccess C# (CSharp) Method

VerifyAccess() public static method

public static VerifyAccess ( string key ) : void
key string
return 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 + "'");
        }