I went with pretty much that direction. And you can't really init all lazy props on first access to public member, that would defeat the whole point.
On Wed, Jan 13, 2010 at 8:00 PM, José F. Romaniello <[email protected]>wrote: > > >> The reason to limit it to auto props is that this way we don't have to >> deal with field level access interception. >> > > As I said in the previous thread this is not sufficient in two scenarios: > a- Linfu. Every proxy is a real proxy with target. So, it will fail if > you use a public property within the class. A nice "NotImplementedException" > for LinFu bytecode should work :) > b- If you allow the user to use interfaces for the proxy. The interface > specified in the proxy attribute, should be used only for the construction > of the standard lazy load proxy. > > Another approach for solving A and B, could be to initialize every lazy > property within the first access to any public member in this scenario. >
