Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Structure Map Error Code 202
- public static void Configure()
- {
- var log = LogManager.GetLogger(typeof (Global1));
- log.Debug("Initializing Container");
- /*Initialize IoC Container*/
- ObjectFactory.Initialize(x =>
- {
- x.For<ITokenService>().Use<TokenService>();
- x.For<ILocalizationService>().Use<LocalizationService>();
- log.Debug("Initializing Object Factory");
- /*Setup Property Injection*/
- x.SetAllProperties(p =>
- {
- p.OfType<ITokenService>();
- p.OfType<ILocalizationService>();
- });
- });
- }
- public BasePage()
- {
- var log = LogManager.GetLogger(typeof (Global1));
- log.Debug("Base Page Build Up");
- /*Inject Dependencies*/
- ObjectFactory.BuildUp(this);
- }
- protected void Application_Start(object sender, EventArgs e)
- {
- log.Debug("In Application Start - Pre BuildUp");
- /*Configure Ioc Container*/
- IocConfigurator.Configure();
- }
Advertisement
Add Comment
Please, Sign In to add comment