Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Function Ctor 2
// Configuration Service
public IConfigurationService ConfigService { get; }
public Function()
// Set up Dependency Injection
var serviceCollection = new ServiceCollection();
var serviceProvider = serviceCollection.BuildServiceProvider();
// Get Configuration Service from DI system
ConfigService = serviceProvider.GetService<IConfigurationService>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment