dhughes
dhughes

Reputation: 735

Do Azure Functions have "start up" lifecycle methods?

Within ASP.NET MVC applications there is the Application_Start method within Global.asax.cs where you can bootstrap things such as dependency injection registration. Is there such a thing for Azure Functions?

I'm aware of the IExtensionConfigProvider interface and the Initialise method when you're using bindings but I'm not using them.

Upvotes: 2

Views: 1454

Answers (1)

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35134

No specific method for this. The idea is tracked in this issue.

One option for now is to use a static constructor, see examples in similar questions one and two.

Upvotes: 2

Related Questions