-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional PipeTo completion handlers #1381
Conversation
Added an optional success and failure handler to PipeTo, to simplify use of Tasks. PipeTo falls back to original behavior when not supplied.
👍 Great idea! Mapping result or failure before sending in |
This is great!! |
Glad you like it! It works perfect in what I've working on. I'm not sure though how much is allowed in the Context.ActorSelection("akka.tcp://remote@remote:1234/user/PingActor")
.ResolveOne(TimeSpan.FromSeconds(1))
.PipeTo(Self,
success: x => x.Ask<Pong>(new Ping()),
failure: e => new TryAgainLater(e.ToString())); I think the syntax becomes more dirty and harder to read, but it would be great with some guidelines. |
BTW, do you know why the build has gone rogue like? |
Add optional PipeTo completion handlers
Reverted this- please add unit tests and resubmit |
Alright, I'll look into creating a few tests for this |
Thanks! |
Resubmitted it as #1383 |
Added an optional success and failure handler to PipeTo, to simplify use of Tasks. PipeTo falls back to original behavior either handler isn't supplied.
Some examples: