Template: "Hello {Name"
That template is clearly missing an end curly brace
Smart.Format("Hello {Name", new { Name = "Anders Jonsson", City = "Stockholm"})
//Result: Exception
So far so good.
But after setting Smart.Default.Settings.ParseErrorAction I get an unexpected output.
Smart.Default.Settings.ParseErrorAction = SmartFormat.Core.Settings.ErrorAction.Ignore;
Smart.Format("Hello {Name", new { Name = "Anders Jonsson", City = "Stockholm"})
//Result: "Hello { Name = Anders Jonsson, City = Stockholm }Name"
Smart.Default.Settings.ParseErrorAction = SmartFormat.Core.Settings.ErrorAction.MaintainTokens;
Smart.Format("Hello {Name", new { Name = "Anders Jonsson", City = "Stockholm"})
//Result: "Hello { Name = Anders Jonsson, City = Stockholm }Name"
Smart.Default.Settings.ParseErrorAction = SmartFormat.Core.Settings.ErrorAction.OutputErrorInResult;
Smart.Format("Hello {Name", new { Name = "Anders Jonsson", City = "Stockholm"})
//Result: "Hello { Name = Anders Jonsson, City = Stockholm }Name"
That doesn't seem like the intended behavior. Am I missing something?