-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
Routing and querystring formatting support #66
Conversation
So, I'm not super excited about the way that this has been implemented. Is there a way that you can implement this s.t. it's an optional parameter to |
I could argue that with the previous solution, a user would only need to bother with it if creating a I made a change however so that you can input an optional |
@carl-berg If we have this as a parameter to |
I think it's kind of a neat feature to be able to use both. I could see formatting a single parameter would be easier using the attribute, but creating a convention that all parameters of a certain type would be formatted a certain way, then you would have to use a |
Let's add the |
It does seem like overkill to provide something that's capable of formatting parameters based on their type and requiring an attribute that ties it to a specific parameter. Wouldn't a Then you could pass in |
Ignore me - a dictionary would actually make it more complicated. Not having the attribute means you can drop the |
I like that you get a bit more context with the |
I don't know. I think if you're going to be passing through the name, you might as well pass the whole |
Any thoughts on this? I think using a settings parameter as input for |
I wonder if the name |
You're right, the interface for |
Looks better to me. Ultimately this is all up to @paulcbetts though. I'm gonna stay out of this so I'm not encouraging you to do any more work he might ask you to undo. |
Hehe, I see what you mean. I think you had some valid points though, and i'm always happy to get code reviews for free 😄. Hopefully @paulcbetts agrees with our thinking too. |
Cool, I'll have a look at this soonish once I can run the tests |
Generic interface support
This is on my list for this week |
Thanks! If there's anything I can do to help out, just let me know. |
You might be able to speed up the process by pulling the latest from upstream into your local master, rebasing your branch on top of it, fixing any merge conflicts and force pushing but if you don't know what you're doing, that could be A Very Bad Idea. ;) |
I think i've done that 😸 (i'm not as fluent in git as i am in hg) |
@@ -335,7 +337,8 @@ public RestMethodInfo(Type targetInterface, MethodInfo methodInfo) | |||
determineReturnTypeInfo(methodInfo); | |||
|
|||
var parameterList = methodInfo.GetParameters().ToList(); | |||
|
|||
ParameterInfoMap = parameterList.Select((parameter, index) => new { index, parameter }) | |||
.ToDictionary(x => x.index, x => x.parameter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uninstall R#, install VsVim instead
Merged with some fixups. Thanks @carl-berg! |
This seems like it would scratch an itch I'm having. Any idea when this will ship? Apologies if it's bad form to ask that, don't want to sound demanding. |
@screamish No worries - I'm probably going to make a build and release it in the next few hours |
Awesome 👍 |
🙇 - that's awesome, indeed! I hope to have something OSS using Refit soon to share. |
Nice 👍 |
This is my proposal for issue #64