Created
May 17, 2017 11:32
-
-
Save dmitry-zaets/d4f3dee6a6e20832026ef3a23d03f3fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void RegisterOptions(this ContainerBuilder builder) | |
{ | |
builder.RegisterGeneric(typeof(OptionsManager<>)) | |
.As(typeof(IOptions<>)) | |
.SingleInstance(); | |
builder.RegisterGeneric(typeof(OptionsMonitor<>)) | |
.As(typeof(IOptionsMonitor<>)) | |
.SingleInstance(); | |
builder.RegisterGeneric(typeof(OptionsSnapshot<>)) | |
.As(typeof(IOptionsSnapshot<>)) | |
.InstancePerLifetimeScope(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment