The issue I'm trying to deal with is that I'm trying to build a JObject and execute queries against it at the same time. But as I don't know what part of the object the query is going to access I don't know which bits need to be built first.
Ideally I'd be able to hook into when properties are being accessed so I can lazily initialize them.
In javascript I can use Proxy for this to intercept property access.
I think this could be achieved relatively easily by adding overloads on JObject and JArray that allows for custom dictionary and list implementations respectively.
The issue I'm trying to deal with is that I'm trying to build a JObject and execute queries against it at the same time. But as I don't know what part of the object the query is going to access I don't know which bits need to be built first.
Ideally I'd be able to hook into when properties are being accessed so I can lazily initialize them.
In javascript I can use Proxy for this to intercept property access.
I think this could be achieved relatively easily by adding overloads on JObject and JArray that allows for custom dictionary and list implementations respectively.