Ejemplo n.º 1
0
 public void Init() {
     var builder = new ContainerBuilder();
     builder.RegisterType<UrlRuleProvider>().As<IRuleProvider>();
     _stubContextAccessor = new StubHttpContextAccessor();
     builder.RegisterInstance(_stubContextAccessor).As<IHttpContextAccessor>();
     _container = builder.Build();
     _urlRuleProvider = _container.Resolve<IRuleProvider>();
 }
Ejemplo n.º 2
0
 public void Init() {
     var builder = new ContainerBuilder();
     _shellSettings = new ShellSettings {RequestUrlPrefix = string.Empty};
     builder.RegisterType<UrlRuleProvider>().As<IRuleProvider>();
     builder.RegisterInstance(_shellSettings);
     _stubContextAccessor = new StubHttpContextAccessor();
     builder.RegisterInstance(_stubContextAccessor).As<IHttpContextAccessor>();
     _container = builder.Build();
     _urlRuleProvider = _container.Resolve<IRuleProvider>();
 }