azure-functions-templates
azure-functions-templates copied to clipboard
Few consistency issues in boiler plate code generated for in-proc
Issue 1
For v4 in-proc, the boilerplate code created for different trigger types are not consistent, some triggers have static class and static method while some are not.
Here are couple of ones I checked. I did not check all (Ex: signalr, rabbitmq etc).
Trigger type | Class | Method |
---|---|---|
Http | Static | Static |
Blob | Non static | Instance |
Queue | Non static | Instance |
Cosmos | Static | Static |
Event grid | Static | Static |
Kafka | Non static | Instance |
Issue 2
Also, the way we are getting logger instance is not consistent between Service bus Queue trigger and Service bus Topic trigger.
Queue trigger uses the ILogger injected into the function while Topic trigger uses constructor DI to get ILogger<T>
Issue 3
There are some unused using
statements in the template which can be removed. (Ex: using Microsoft.Azure.WebJobs.Host
)