Skip to content

FluidTemplateExtensions.Render hangs permanently #149

Closed

Description

@Metalnem

FluidTemplateExtensions.Render hangs permanently when you run the following program (using .NET Core 2.2 and Fluid.Core 1.0.0-beta-9588):

using System.Collections.Generic;

namespace Fluid.Fuzz
{
	public class User
	{
		public string String { get; set; }
		public int Integer { get; set; }
		public List<double> Doubles { get; set; }
	}

	public class Program
	{
		public static void Main(string[] args)
		{
			var model = new User
			{
				String = "ABC",
				Integer = 123,
				Doubles = new List<double> { 1.1, 2.2, 3.3 }
			};

			var template = "<<lli>{{Doubles |map |uniq}}<\n{%";

			if (FluidTemplate.TryParse(template, out var result))
			{
				TemplateContext.GlobalMemberAccessStrategy.Register<User>();
				result.Render(new TemplateContext { Model = model });
			}
		}
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions