开发者

Method chaining and the finishing problem

开发者 https://www.devze.com 2022-12-18 09:56 出处:网络
are there any approaches, given a statement like the following First().Second(); to know from within First() whether/when Second() has executed?

are there any approaches, given a statement like the following

First().Second();

to know from within First() whether/when Second() has executed?

Reference: http://marti开发者_运维问答nfowler.com/dslwip/MethodChaining.html


Second() will not execute until First() has completed, therefore this is impossible. All that First() can do is to violate fluency, thereby making it impossible for Second() to run.

0

精彩评论

暂无评论...
验证码 换一张
取 消