-
Notifications
You must be signed in to change notification settings - Fork 5
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
async methods #34
Comments
Hi @mikej0 , Thank you very much for this request. Best regards, |
Hi @mikej0, I was looking into this issue and noticed that using an async Best regards, |
Hi Kevin, Just had a look, and I think the issue is that I want to be able to continue with the fluent api. Looking at the example, it appears that the async method would be the last. I can't see that it's possible to have it return the interface? So for example, assuming I have an API that allows me to post a new user. The request will return the full record, which now has an ID as well. I can capture that in the same fluent class, so that I could continue editing the object and put an update. Something like:
If that's already possible and I've misunderstood, that would be great. Cheers, Mike |
I've also just realised it might have difficulty re-using the same method name. This fluent api I've just described would also need For example, in my mind, this would be ideal:
One workaround would be that What do you think? Thanks, Mike |
Hello,
I haven't seen a mention of this in the docs.
I'm working with fluent interfaces that call an API, so the last method call in a chain will fire off the request. When I work on the classes manually, I usually have a
Send()
method which just calls it's neighbourSendAsync()
synchronously, so I have the option. If it can't yet, is it possible to detect method signatures with async in it and have it return theTask<IInterface>
instead of only theIInterface
? Or is there already a way I should be approaching this?Good work though - looks like this will save me a massive amount of time!
Thanks,
Mike
The text was updated successfully, but these errors were encountered: