I've been working on an API (which wraps a web-service of sorts) for a while now, and its just about feature complete.
I initially designed this API to be lazy/delay-loaded throughout; which makes perfect sense if you're only interested in a small subset of the available data given the latency inherent in consuming a web-service. However, I failed to consider a few use cases where eager loading would be much easier on a consumer of the API.
So, my question is: How would you like to see an API that is predominately lazy-loading expose a mechanism for getting eagerly-loaded versions of classes?
I'm leaning towards an explicit
cast, but something along the lines of Eager.AsEager(SomeDelayLoadingObject)
also seems natural if more verbose.