Azure-functions-host: Support enum binding from route URI

Created on 2 Jun 2017  路  1Comment  路  Source: Azure/azure-functions-host

Currently, Enum binding is not supported from URI, so the following would not work:

Route: func/{myenum}

Function:

public static void Run(MyEnum myenum) { 
}

public enum MyEnum
{
    EnumA,
    EnumB
}

This should be supported.

improvement

Most helpful comment

Just ran into this on functions v2 framework core 2.2 when binding to a POCO from the query. It doesn't look like Enum binding is supported. Dredging up a super old issue here but are there any plans to at least expose some model binding extension points in the framework (similar to IModelBinder / Provider / IValueProvider etc.) for custom model binding like traditional dotnet core api has?

>All comments

Just ran into this on functions v2 framework core 2.2 when binding to a POCO from the query. It doesn't look like Enum binding is supported. Dredging up a super old issue here but are there any plans to at least expose some model binding extension points in the framework (similar to IModelBinder / Provider / IValueProvider etc.) for custom model binding like traditional dotnet core api has?

Was this page helpful?
0 / 5 - 0 ratings