Created
January 29, 2015 20:54
-
-
Save KevM/6538b6fb243bf8172e1d to your computer and use it in GitHub Desktop.
Make sure all your Bottle StructureMap registries are imported
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 WebRegistry : Registry | |
| { | |
| public WebRegistry() | |
| { | |
| //Your application's normal registries | |
| IncludeRegistry<BootstrapRegistry>(); | |
| IncludeRegistry<SettingsProviderRegistry>(); | |
| //typical scanner type stuff | |
| Scan(x => | |
| { | |
| x.TheCallingAssembly(); | |
| x.WithDefaultConventions(); | |
| }); | |
| //scan all bottle assemblies looking for registries | |
| Scan(scanner => | |
| { | |
| PackageRegistry.PackageAssemblies.Each(scanner.Assembly); | |
| scanner.LookForRegistries(); | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment