News for hackers. Stuff that matters.
Re:Open Source .NET libraries that make your life easier by bratsche on Friday April 10, 2015 @12:06PM (#9355209)
> RestSharp makes talking to RESTful apis easier.

Another interesting library for doing REST APIs is Refit: https://github.com/paulcbetts/refit

Re:Open Source .NET libraries that make your life easier by Hakeashar on Friday April 10, 2015 @04:10PM (#9356834)
Damn, thanks for pointing me in that direction. It's exactly what I've been looking for.

Technically, I implemented some of that stuff myself because I needed REST client that would work with PCLs and be a bit 'nicer' to use than just juggling strings/routes everywhere, so using annotations and wrapping Microsoft's HttpClient was obvious and relatively easy way out.

Anyway, I'll probably just phase out my own solution and start using the library.

[EDIT]

After checking it out, RefitStubs.cs file seems a little bit clunky, but the library as a whole looks solid enough. I'll look further into it.

Re:Open Source .NET libraries that make your life easier by xpaulbettsx on Saturday April 11, 2015 @12:33AM (#9358505)
RefitStubs is necessary because on certain platforms (iOS, WinRT), you cannot JIT and therefore can't use something like Castle Core to generate a class
Re:Open Source .NET libraries that make your life easier by Hakeashar on Saturday April 11, 2015 @07:12AM (#9359104)
I figured as much. Unfortunately there's no Emit for AOT where you could do something like: https://github.com/jonwagner/Insight.Database/blob/master/In...

On the other hand, I wonder if it wouldn't be easier to ship a T4 template? I know for sure that would integrate with VS (both the IDE and build process) without any issues, not sure about Xamarin Studio...