ExecutionContext is available to functon parameters.
However, it is not available to other methods via dependency inject, including Functions\' constructor, like below:
Based on current documentation, ExecutionContext
is only available in the scope of a request when the function method is being invoked.
[FunctionName("Car")]
public async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)]
HttpRequest req,
ExecutionContext context //<--
) {
var path = context.FunctionAppDirectory;
//...
}
It wont be available as yet in the constructor for injection when the function class is initialized.