public override Action CreateAction(string actionName, ShortList <Argument> arguments, string externalName = null) { if (actionName != null && actionName == "RightsProtectMessage") { return(new RightsProtectMessageAction(arguments)); } throw new ParserException(RulesStrings.InvalidActionName(actionName)); }
private static ClientAccessRuleAction CreateAction(string actionName, ShortList <Argument> arguments) { if (string.Compare(actionName, "AllowAccess", StringComparison.OrdinalIgnoreCase) == 0) { return(new ClientAccessRuleAllowAccessAction(arguments)); } if (string.Compare(actionName, "DenyAccess", StringComparison.OrdinalIgnoreCase) == 0) { return(new ClientAccessRuleDenyAccessAction(arguments)); } throw new RulesValidationException(RulesStrings.InvalidActionName(actionName)); }