Comments (13)
I've got one of these hanging around that I will add later today. I assume you meant ReSharper and not rebracer?
from refit.
No, I meant rebracer, though R# works too.
https://visualstudiogallery.msdn.microsoft.com/410e9b9f-65f3-4495-b68e-15567e543c58
from refit.
I will never like the java/javascript brace style :P
from refit.
Never heard of rebracer. Will check it out.
from refit.
Yeah, it's a bit more targeted than R# and it's free, so it's more likely to get people to abide by it. Just install the VSIX and go.
from refit.
from refit.
@paulcbetts 👍
from refit.
Cool. Will sort them both out soon. 😸
from refit.
@bennor Steal them from ReactiveUI
from refit.
👍 easy
from refit.
Okay, so not quite as easy as I'd hoped. There's no Rebracer.xml
in RxUI, and the R# settings seem to be a fair bit different to the ones I had created.
I created mine by messing with R# options and formatting RequestBuilderImplementation.cs
until there were no visible changes to the file after formatting, so I'm pretty sure it's good. (It has a few things that are missing from the RxUI one -- like catch
blocks being on the same line, etc.)
I'll create a PR with the files in a few minutes.
from refit.
The R# ones look good, except for missing the Add Braces for an if block if they're not already there.
The rebracer ones don't seem to work; Edit->Format document gives me different results. Maybe the Rebracer just isn't worth the hassle?
from refit.
The R# one should be forcing braces for multi-line but hoisting single line if statements up to the same line, which was the convention Paul seemed to o be using. I did this all by guesswork and comparison to existing code, so it's entirely possible there are some gaps.
I wonder why the rebracer file doesn't work? The R# one is more comprehensive but both of them still have some small differences. There are some things in the existing code that aren't consistent with each other (like spaces after an if
keyword), so for those I just tried to match whatever was more common.
from refit.
Related Issues (20)
- [Bug]: POST request sent as GET HOT 9
- [Bug]: Long-lived HttpClient instance despite use of IHttpClientFactory HOT 1
- [Bug]: HttpClients not disposed
- [Bug]: Request streams get disposed and there is no option to avoid it
- Source generator for minimal API
- [Bug]: Cannot set the Content-Type header for a POST request HOT 2
- [Bug]: Refit Does Not Generate Implementations if 3+ Interfaces Share a Name HOT 1
- [Bug]: exception with TrimMode full: "URL /path/{id} has parameter id, but no method parameter matches"
- Dependency Dashboard
- [NiceToHave]: Interface `IApiResponse<out T>` misses `[MemberNotNullWhen(true, nameof(Content))]` attribute
- [Bug]: Using `Refit.HttpClientFactory` with a .Net 8 Blazor Web App HOT 5
- Ability to more simply configure a scoped authorization token
- Support [ValueConvertion] attribute HOT 4
- Leverage framework to provide dependencies
- [Bug]: HttpClient named client with the same name overwrite ConfigureHttpClient BaseAddress
- [Bug]: "doesn't look like a Refit interface" when inheriting empty interface from interface with refit function
- Is there any way to implement optional authentication?
- [Bug]: source generation fails when interfaces mismatch in casing when inheriting generic interfaces.
- Document Interface Composition Working Example
- [Bug]: Refit requires at least the .NET Core SDK v2.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from refit.