I would like to bind a custom type property (or field), exposed on an instanciated type injected in the LanguageRuntime at construction time, and being able to index access it directly in the expression script.
For example :
MyCollection.TotalAmount >= 1200
Where MyCollection is a List<T> property of my custom type.
I found the method binding pattern (BuiltIns.AddMethod). However, if i use this approach, i would have to use a method call syntax in the script (with parenthesis).
MyCollection(1).TotalAmount >= 1200
x = MyCollection()
x.TotalAmount >= 1200
Both previous syntax are a bit overwhelming. Direct access to the collection type in the script would be super cool.
Do you have any suggestion ?