A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/sebastienros/fluid/issues/149 below:

FluidTemplateExtensions.Render hangs permanently · Issue #149 · sebastienros/fluid · GitHub

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 });
			}
		}
	}
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4