public static CatNet_Rules_Mappings add(this CatNet_Rules_Mappings rulesMappings, string vulnName, string target) { rulesMappings.Add(new Rule_Mapping() { VulnName = vulnName, Target = target }); return(rulesMappings); }
public static bool hasItem(this CatNet_Rules_Mappings rulesMappings, string vulnName) { return(rulesMappings.item(vulnName).notNull()); }
public static string item(this CatNet_Rules_Mappings rulesMappings, string vulnName) { return(rulesMappings.Where((mapping) => mapping.VulnName == vulnName) .Select((mapping) => mapping.Target).first()); }