I have a continuously running webjob that uses queue trigger. I need some data that is configured in the app.config file and i use
public static void ProcessQueueMessage([QueueTrigger("%queueName%")] Model modelMessage, int dequeueCount, [Blob("%blobStorageName%")] CloudBlobContainer cloudBlobContainer, string id)
{
// some code here
var setting = ConfigurationManager.AppSettings["setting"];
// some code using setting
}
to get the data into setting into the variable. But all of this is in Azure webjobs 2.1 sdk. But from 3.x we only have appsettings.json file. how do i get the setting from json file into inside the trigger method
Used dependency injection to inject HostBuilderContext to the constructor and got the config from there.