コード例 #1
0
 public SectionsController(ISectionNodeService sectionNodeService,
                           IMappingEngine mapper,
                           ISectionTemplateService sectionTemplateService)
 {
     _sectionNodeService     = sectionNodeService;
     _mapper                 = mapper;
     _sectionTemplateService = sectionTemplateService;
 }
コード例 #2
0
        protected override void PostFixtureSetup()
        {
            _unitOfWorkMock          = new Mock <IUnitOfWork>();
            _dbContextMock           = new Mock <IDbContext>();
            _pageTemplateServiceMock = new Mock <IPageTemplateService>();
            _sectionTemplateService  = new SectionTemplateService(_unitOfWorkMock.Object, _pageTemplateServiceMock.Object);

            _unitOfWorkMock.Setup(x => x.Context).Returns(_dbContextMock.Object);
        }
コード例 #3
0
 public SectionWidgetService(IWidgetBasePartService widgetService, ISectionGroupService sectionGroupService,
                             ISectionContentProviderService sectionContentProviderService, ISectionTemplateService sectionTemplateService,
                             IApplicationContext applicationContext, CMSDbContext dbContext)
     : base(widgetService, applicationContext, dbContext)
 {
     _sectionGroupService           = sectionGroupService;
     _sectionContentProviderService = sectionContentProviderService;
     _sectionTemplateService        = sectionTemplateService;
 }
コード例 #4
0
ファイル: TemplateEngine.cs プロジェクト: officert/CmsLite
 public TemplateEngine(IUnitOfWork unitOfWork,
                       ISectionTemplateService sectionTemplateService,
                       IPageTemplateService pageTemplateService,
                       IPagePropertyTemplateService propertyTemplateService)
 {
     _unitOfWork              = unitOfWork;
     _sectionTemplateService  = sectionTemplateService;
     _pageTemplateService     = pageTemplateService;
     _propertyTemplateService = propertyTemplateService;
 }
コード例 #5
0
 public SectionWidgetService(IWidgetBasePartService widgetService, ISectionGroupService sectionGroupService,
                             ISectionContentProviderService sectionContentProviderService, ISectionTemplateService sectionTemplateService,
                             IApplicationContext applicationContext, IPluginLoader pluginLoader)
     : base(widgetService, applicationContext)
 {
     _sectionGroupService           = sectionGroupService;
     _sectionContentProviderService = sectionContentProviderService;
     _sectionTemplateService        = sectionTemplateService;
     _pluginLoader = pluginLoader;
 }
コード例 #6
0
        public void SetupFixture()
        {
            Container = new Container();
            Container.Register(new List <IRegistry>
            {
                new CmsIocModule(),
                new ServicesNinjectModule(),
                new DataNinectModule()
            });

            UnitOfWork              = Container.Resolve <IUnitOfWork>();
            SectionTemplateService  = Container.Resolve <ISectionTemplateService>();
            PageTemplateService     = Container.Resolve <IPageTemplateService>();
            SectionNodeService      = Container.Resolve <ISectionNodeService>();
            PageNodeService         = Container.Resolve <IPageNodeService>();
            PropertyTemplateService = Container.Resolve <IPagePropertyTemplateService>();
            PropertyService         = Container.Resolve <IPagePropertyService>();

            PostFixtureSetup();
        }
コード例 #7
0
        public void SetupFixture()
        {
            _container = new Container();
            _container.Register(new List <IRegistry>
            {
                new CmsIocModule(),
                new ServicesNinjectModule(),
                new DataNinectModule()
            });

            _unitOfWork = _container.Resolve <IUnitOfWork>();
            _dbContext  = _container.Resolve <IDbContext>();

            _sectionTemplateService = _container.Resolve <ISectionTemplateService>();
            _pageTemplateService    = _container.Resolve <IPageTemplateService>();

            _templateEngine = _container.Resolve <ITemplateEngine>();

            _assembly = Assembly.GetExecutingAssembly();

            DeleteAllSectionTemplates();
        }
コード例 #8
0
 public SectionNodeService(IUnitOfWork unitOfWork, ISectionTemplateService sectionTemplateService, IPageNodeService pageNodeService)
 {
     _unitOfWork             = unitOfWork;
     _sectionTemplateService = sectionTemplateService;
     _pageNodeService        = pageNodeService;
 }