Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のようなステートメントが与えられた場合、アプローチはありますか
First().Second();
First()実行したかどうか/いつ実行したかを内部から知るにSecond()は?
First()
Second()
参考: http: //martinfowler.com/dslwip/MethodChaining.html
Second()が完了するまで実行されないFirst()ため、これは不可能です。できるFirst()ことは、流暢さを損なうことだけであり、それによってSecond()実行できなくなります。