OptionInject OptionInject is a Roslyn Source Generator for automatically registering options in ASP.NET Core. https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options