public void TestNoArguments() { var result = UserDefinedArgumentData.Create(JinjaLanguageDefinition.Instance, Array.Empty <ParameterDeclaration>(), Array.Empty <object?>() ); PerformTest(result, Array.Empty <(string Name, object?Value, bool Provided)>()); }
internal static object?Super(IScope scope, UserDefinedArgumentData args) { var rootContext = GetRootContext(scope); if (rootContext.CurrentBlockName == null) { throw new NotImplementedException(); } var nextBlock = rootContext.GetBlock(rootContext.CurrentBlockName, (rootContext.CurrentBlockIndex ?? 0) + 1); if (nextBlock == null) { return(null); } nextBlock.Transform(rootContext.Transformer); return(string.Empty);
public void TestAllRequiredAndProvidedViaPositional() { var result = UserDefinedArgumentData.Create(JinjaLanguageDefinition.Instance, new[] { new ParameterDeclaration("a"), new ParameterDeclaration("b"), new ParameterDeclaration("c"), }, new object?[] { 123, 456, 789 } ); PerformTest(result, new (string Name, object?Value, bool Provided)[] {
protected override object?Invoke(UserDefinedArgumentData argumentData) { return(base.Invoke(argumentData)); }