I have an application, where the user can create Expressions
through the ui. This Expressions, he can assign to almost every property of every object-instance throughout the whole application.
Expressions can be properties, or can be contained in lists / dicts, if something requires multiple expressions.
Now, i’m thinking of building a UI-Part that quickly outlines where a expression is used. i.e. something like:
Expression:
"$variable1 > 100"
Usage:
Instance55 of Class C in property "OutOfBoundsExpression"
Instance2 of Class B in property "IsWaterBoilingExpression"
I could manually track this, sure – but I wonder if there is a builtin way to query for this? My thoughts are wandering around the GarbageCollector, it should be pretty well aware of what object is used wherr?
Something like
Expression instance; //received through whatever way.
Dictrionary<Object, PropertyInfo> usages = System.GarbageCollector.GetReferenceMap(instance);