Last active
January 31, 2019 10:24
-
-
Save trnktms/dd2b638acb181103f328b9af4d60334f to your computer and use it in GitHub Desktop.
This file contains 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 Initializer | |
{ | |
public static void Process(PipelineArgs args) | |
{ | |
container = new Container(); | |
container.Options.DefaultScopedLifestyle = new WebRequestLifestyle(); | |
container.Register(typeof(ISitecoreContext), () => new SitecoreContext(), Lifestyle.Scoped); | |
DependencyResolver.SetResolver( | |
new ChainedDependencyResolver( | |
new SimpleInjectorDependencyResolver(container), | |
DependencyResolver.Current)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment