コード例 #1
0
 protected override CmsContext CreateContext(Action<ICmsConfigurator> configure = null)
 {
     var container = new WindsorContainer();
     var configurator = container.ConfigureCms();
     SharedConfiguration(configurator);
     if (configure != null)
         configure(configurator);
     return new TestCmsContext(new CmsContainerProvider(() =>
     {
         var child = new WindsorContainer
         {
             Parent = container
         };
         return new CastleCmsContainer(child);
     }));
 }