This validation was outdated. Tested locally using Microsoft.NET.Sdk.Functions (3.0.2) and Microsoft.Azure.WebJobs (3.0.22).
[Disable(typeof(ValidadorDisable))]
[FunctionName(FunctionName)]
public async Task Run([TimerTrigger(CronJob)] TimerInfo timer, ILogger log)
{
throw new NotImplementedException();
}
Retrieving my boolean disabled settings from a config file using the Type overload:
public class ValidadorDisable
{
public bool IsDisabled(MethodInfo method)
{
var functionName = method.GetCustomAttributes(true).OfType<FunctionNameAttribute>().FirstOrDefault().Name;
return Configuration.Get.FunctionConfiguration.DisabledFunctions[functionName];
}
}
This validation was outdated. Tested locally using Microsoft.NET.Sdk.Functions (3.0.2) and Microsoft.Azure.WebJobs (3.0.22).
Retrieving my boolean disabled settings from a config file using the Type overload: