Allow expressions with leading dollar sign in ValueResolver.Resolve method

This commit is contained in:
VladV 2023-01-14 20:29:10 +04:00
parent 2350b65663
commit f5f09ed76e

View File

@ -7,6 +7,11 @@ namespace TriInspector.Resolvers
public static ValueResolver<T> Resolve<T>(TriPropertyDefinition propertyDefinition,
string expression)
{
if (expression != null && expression.StartsWith("$"))
{
expression = expression.Substring(1);
}
if (StaticFieldValueResolver<T>.TryResolve(propertyDefinition, expression, out var sfr))
{
return sfr;