Hello.
Even if I'm already implementing BindAsync in my custom Binder, I get an error saying I need to implement TryParse. If I remove the parameter from the route, then it simply will ignore it:
public class DecryptedId
{
public long Id { get; init; }
public static ValueTask<DecryptedId?> BindAsync(HttpContext httpContext, ParameterInfo parameter)
{
var encoder = httpContext.RequestServices.GetRequiredService<SqidsEncoder<long>>();
var routeId = httpContext.Request.RouteValues[parameter.Name!]?.ToString();
if (string.IsNullOrEmpty(routeId))
return ValueTask.FromResult<DecryptedId?>(null);
var decryptedId = encoder.Decode(routeId).Single();