Closed MovGP0 closed 8 years ago
Execute
returns TResult
, not ExperimentResult<TResult>
. The reason for this is that the experiment results are really only useful in publishing, and the application flow only needs the result of the control function.
I'm not sure I see a need to have it return an experiment result.
Sorry. I mixed up the order. What I meant was essentially that instead of:
Shience.New<bool>("name")
.PublishTo(result => HandleSuccessOrError(result))
.Execute().
we could do something like:
Shience.New<bool>("name")
.PublishTo(result => HandleSuccessOrError(result))
.PublishSuccessTo(result => HandleSuccess(...))
.PublishErrorTo(result => HandleError(...))
.Execute()
The advantage is that this style leads to a better separation of concerns in the user code.
the additional methods are implemented, but they need testing and documentation.
There should be extension methods to make use of the
ExperimentResult
object more fluent: