Расширенный метод Protect


Расширенный метод Protect
Atom
9/22/2011


Не как не могу понять как воспользоваться данным методом...
Можно небольшой прием если несложно...

Tags:


Thanks:


Alexander

Avatar
Date: 9/22/2011
Reply


frontman Go to
Не как не могу понять как воспользоваться данным методом...
Можно небольшой прием если несложно...

Code

				this
					.When(order.Registered())
					.Protect(order, take, stop)
					.Activated<Strategy>(s =>
						this
							.When(s.Stopped())
							.Do(() => IsFinished = true));
Thanks:

frontman

Avatar
Date: 9/22/2011
Reply


Ого))
Thanks:

frontman

Avatar
Date: 9/22/2011
Reply


Я правильно понял что
Code
.Activated<Strategy>(s =>
        this
            .When(s.Stopped())
            .Do(() => IsFinished = true)

Это лишний код?)))
Thanks:

Alexander

Avatar
Date: 9/22/2011
Reply


frontman Go to
Я правильно понял что
Code
.Activated<Strategy>(s =>
        this
            .When(s.Stopped())
            .Do(() => IsFinished = true)

Это лишний код?)))


Ну да, будет и без этого работать :)
Это на остановку.
Thanks: frontman


Attach files by dragging & dropping, , or pasting from the clipboard.

loading
clippy