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

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


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


Tags:


Thanks:


Alexander

Avatar
Date: 9/22/2011
Reply


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


				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


Я правильно понял что

.Activated<Strategy>(s =>
        this
            .When(s.Stopped())
            .Do(() => IsFinished = true)

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

Thanks:

Alexander

Avatar
Date: 9/22/2011
Reply


frontman: Я правильно понял что

.Activated(s => this .When(s.Stopped()) .Do(() => IsFinished = true)

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

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


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

loading
clippy