Skip to main content

dotnet

Implementing IOptionsFactory to create custom options instances

·387 words·2 mins
Recently, I was writing a .NET console app to integrate with a third-party library and had an opportunity to use the IOptions pattern. However, the settings object didn’t have a public, parameterless constructor. Here’s how I used IOptionsFactory to support these types of options classes…