azure-webjobs-sdk-extensions icon indicating copy to clipboard operation
azure-webjobs-sdk-extensions copied to clipboard

Add support for custom names for values in data binding

Open MO2k4 opened this issue 2 years ago • 2 comments

Currently it is not possible to use different names for binding than the property names. To be more flexible, i added a check if DataMemberAttribute is set and use this name instead of the property name

public class TestPocoWithDataMember
{
    [DataMember(Name = "custom_value")]
    public string CustomValue { get; set; }

    public string Location { get; set; }
}

This would allow the developer to bind the data against query parameter like custom_value.

MO2k4 avatar Jul 15 '22 13:07 MO2k4

CLA assistant check
All CLA requirements met.

net-foundation-cla[bot] avatar Jul 15 '22 13:07 net-foundation-cla[bot]

@mathewc @fabiocav Sorry for contacting you directly, but i've seen that you closed some prs in the last weeks.

Could you please take a look at my pr? If you are not the correct persons mentioned, could you please forward my pr for review? Is there anything i could do or improve in my pr to get this merged?

Thanks in advance

MO2k4 avatar Aug 23 '22 17:08 MO2k4