Skip to content

Why use reflection on the delegates for routes? #4

@jamie-healey-xr

Description

@jamie-healey-xr

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())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions