Exemple #1
0
        public bool IsValidForAgent(string agentName)
        {
            if (OnlyOnAgents == null)
            {
                return(true);
            }

            return(OnlyOnAgents.Any(x => x == agentName));
        }
        public bool IsValidForAgent(string agentName)
        {
            if (OnlyOnAgents?.Any(x => x == agentName) ?? true)
            {
                return(true);
            }

            return(OnlyOnAgents.Where(t => t.Contains("*")).Any(agent => new Regex("^" + agent.Replace("*", ".*")).IsMatch(agentName)));
        }
 public bool IsValidForAgent(string agentName) => OnlyOnAgents?.Any(x => x == agentName) ?? true;