in src/Microsoft.NET.Sdk.Functions.Generator/MethodInfoExtensions.cs [121:137]
public static string GetSdkFunctionName(this MethodDefinition method)
{
if (!method.IsWebJobsSdkMethod())
{
throw new ArgumentException($"{nameof(method)} has to be a WebJob SDK function");
}
string functionName = method.CustomAttributes.FirstOrDefault(a => a.AttributeType.Name == "FunctionNameAttribute")?.ConstructorArguments[0].Value.ToString();
if (functionName != null)
{
return functionName;
}
else
{
throw new InvalidOperationException("Missing FunctionNameAttribute");
}
}