Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FluidTemplateExtensions.Render hangs permanently #149

Closed
Metalnem opened this issue Aug 31, 2019 · 0 comments
Closed

FluidTemplateExtensions.Render hangs permanently #149

Metalnem opened this issue Aug 31, 2019 · 0 comments

Comments

@Metalnem
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant