Greetings people!
As the title says, I got enough of manual integrations and I wanted to use interfaces to connect to the server endpoints. Because the project grew a lot, I'm now looking for feedback in order to validate and improve it for production/industrial usage.
Yes, I tried looking for libraries that combined good developer experience, speed and free of memory leaks, but I couldn't find anything that could suffice. I wanted to call endpoints from interfaces that shared the same firm.
The idea developed a lot, and now it became a declarative framework with optional manual settings:
First, we need a Contract:
[HttpTransport] public interface IUserContract : IControllerContract { [RateLimit(5)] [HttpGet] Task TestHubcon(string message); }
A Controller:
[Authorize(Roles:"Staff")] [UseJwt] public class UserController : IUserContract { [Authorize(Roles:"Manager")] public async Task GetUser(string id) => return "Server response"; }
Then calling it from the client using the optional Execute…