in src/Microsoft.NET.Sdk.Functions.Generator/ParameterInfoExtensions.cs [27:41]
public static IEnumerable<JObject> ToFunctionJsonBindings(this ParameterDefinition parameterInfo)
{
return parameterInfo
.CustomAttributes
.Where(a => a.IsWebJobsAttribute()) // this has to return at least 1.
.Select(a => TypeUtility.GetResolvedAttribute(parameterInfo, a)) // For IConnectionProvider logic.
.Select(a => a.ToJObject()) // Convert the Attribute into a JObject.
.Select(obj =>
{
// Add a name property on the JObject that refers to the parameter name.
obj["name"] = parameterInfo.Name;
return obj;
})
.ToList();
}