Ejemplo n.º 1
0
 public PageCollectionCreateController(IPageService pageService, IPageCollectionService pageCollectionService, IPageLinkGenerator pageLinkGenerator, IPageMetadataManager pageMetadataManager)
 {
     this.pageService           = pageService ?? throw new ArgumentNullException(nameof(pageService));
     this.pageCollectionService = pageCollectionService ?? throw new ArgumentNullException(nameof(pageCollectionService));
     this.pageLinkGenerator     = pageLinkGenerator ?? throw new ArgumentNullException(nameof(pageLinkGenerator));
     this.pageMetadataManager   = pageMetadataManager ?? throw new ArgumentNullException(nameof(pageMetadataManager));
 }
        public PageCollectionServiceTests()
        {
            var services = new ServiceCollection();

            services.AddPages()
            .AddContentTypesFromAssemblies(typeof(TestPageContent).Assembly)
            .AddFakes();

            services.AddSingleton <IWebsiteContext>(new TestWebsiteContext("test", "test"));

            serviceProvider = services.BuildServiceProvider();
            serviceScope    = serviceProvider.CreateScope();

            pageService           = serviceScope.ServiceProvider.GetService <IPageService>();
            pageCollectionService = serviceScope.ServiceProvider.GetService <IPageCollectionService>();
            pageMetadataManager   = serviceScope.ServiceProvider.GetService <IPageMetadataManager>();
        }
Ejemplo n.º 3
0
 public PageListController(IPageService pageService, IPageCollectionService pageCollectionService, Url.IPageLinkGenerator pageLinkGenerator)
 {
     this.pageService           = pageService ?? throw new ArgumentNullException(nameof(pageService));
     this.pageCollectionService = pageCollectionService ?? throw new ArgumentNullException(nameof(pageCollectionService));
     this.pageLinkGenerator     = pageLinkGenerator ?? throw new ArgumentNullException(nameof(pageLinkGenerator));
 }
 public PageCollectionUpdateController(IPageCollectionService pageCollectionService)
 {
     this.pageCollectionService = pageCollectionService ?? throw new ArgumentNullException(nameof(pageCollectionService));
 }
Ejemplo n.º 5
0
 public SetupController(IPageCollectionService pageCollectionService, IPageMetadataManager pageMetadataManager, IPageService pageService)
 {
     this.pageCollectionService = pageCollectionService ?? throw new ArgumentNullException(nameof(pageCollectionService));
     this.pageMetadataManager   = pageMetadataManager ?? throw new ArgumentNullException(nameof(pageMetadataManager));
     this.pageService           = pageService ?? throw new ArgumentNullException(nameof(pageService));
 }