0

are there any approaches, given a statement like the following

First().Second();

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

Reference: http://martinfowler.com/dslwip/MethodChaining.html

Simone
  • 3,607
  • 1
  • 31
  • 37

1 Answers1

2

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.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • I wouldn't say impossible, though. I was wondering if playing with CallContext or threads there would be a clean way to achieve it. – Simone Jan 27 '10 at 12:35