Created
April 4, 2017 07:37
-
-
Save MongkonEiadon/5c3822456cbea3e13db2b3415c9c656f to your computer and use it in GitHub Desktop.
Register the reader and the configuration models
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 class AppSettingModule : Autofac.Module { | |
protected override void Load(ContainerBuilder builder) { | |
builder.RegisterType<ConfigurationReader>().As<IConfigurationReader>().SingleInstance(); | |
builder.Register(c => c.Resolve<IConfigurationReader>().Load<BotConfiguration>()).As<IBotConfiguration>(); | |
// Register future model here... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment