public static void Write(this TemplateRewriterContext context, List <ScriptNamedArgument> parameters) { if (parameters == null) { return; } for (int i = 0; i < parameters.Count; i++) { ScriptNamedArgument option = parameters[i]; context.ExpectSpace(); context.Write(option); } }
protected override void ProcessArgument(TemplateContext context, ScriptNamedArgument argument) { _columnsCount = 1; if (argument.Name == "cols") { _columnsCount = context.ToInt(argument.Value.Span, context.Evaluate(argument.Value)); if (_columnsCount <= 0) { _columnsCount = 1; } return; } base.ProcessArgument(context, argument); }
protected virtual void ProcessArgument(TemplateContext context, ScriptNamedArgument argument) { throw new ScriptRuntimeException(argument.Span, string.Format(RS.InvalidArgInForLoop, argument.Name, this)); }
public static void AddParameter(this IScriptNamedArgumentContainer container, ScriptNamedArgument argument) { if (container.NamedArguments == null) { container.NamedArguments = new List <ScriptNamedArgument>(); } container.NamedArguments.Add(argument); }