I've fixed two issues on Expression generation in compilation
Variable access to reference types causes ArugmentException
class Test {
public object TestObject = new object();
}
var template = "Result is {{TestObject}}";
throws ArgumentException: Argument types do not match.
Model class which has ToString() method causes ArugmentException
class Test {
public string TestString = "Hello";
public override string ToString() { return base.ToString(); }
}
var template = "Result is {{TestString}}";
throws ArgumentException: Method 'System.String ToString()' declared on type 'Test' cannot be called with instance of type 'System.String'.
Also, I have added test cases for these situations.
I've fixed two issues on Expression generation in compilation
Variable access to reference types causes ArugmentException
throws
ArgumentException: Argument types do not match
.Model class which has ToString() method causes ArugmentException
throws
ArgumentException: Method 'System.String ToString()' declared on type 'Test' cannot be called with instance of type 'System.String'
.Also, I have added test cases for these situations.