Is ok for implementations of IEnumerator.MoveNext() to include a long running process? -
Is ok for implementations of IEnumerator.MoveNext() to include a long running process? -
are implementations of ienumerator.movenext()
expected relatively quick? or ok if "moving next item" includes disk io, web requests, or other potentially long running operations?
for illustration i'm working on project processes documents, , want abstract access documents idocumentsource
. implementations of idocumentsource
may pull documents local file system, other's may download documents webserver temp location before opening them. in case movenext()
close , delete previous temp file, , download , open next file process.
there no guidelines expected performance of movenext()
, unlike ones exist property getters, example.
you approach looks reasonable. still, wise include note behavior in class/method docs.
ienumerator
Comments
Post a Comment