Skip to content
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

Why use reflection on the delegates for routes? #4

Open
jamie-healey-xr opened this issue Feb 20, 2023 · 0 comments
Open

Why use reflection on the delegates for routes? #4

jamie-healey-xr opened this issue Feb 20, 2023 · 0 comments

Comments

@jamie-healey-xr
Copy link

It wouldn't be hard to add in a more type safe way of defining those handlers for each route.
Calling via string isn't good.

You could either

// by attribute
[Http(Route.Type.Get)]
private Response HandleTheRequest(Request req)
{
}

// Manually register functions
routingManager.AddRoute(new Route(Route.Type.Get, "route/path", myController.GetTheThing())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant