public PageViewModel(INavigationService navigationService, IPageContentService pageContentService) : base(navigationService) { this.pageContentService = pageContentService; // Load(); }
async Task IAsyncActionFilter.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { pageService = HttpContext.RequestServices.GetRequiredService <IPageService>(); pageEditingService = HttpContext.RequestServices.GetRequiredService <IPageContentService>(); if (!Request.Query.TryGetValue("editId", out Microsoft.Extensions.Primitives.StringValues editIdValue) || !Guid.TryParse(editIdValue[0], out Guid editId)) { context.Result = BadRequest(); return; } editSession = await pageEditingService.FindEditByIdAsync(editId, HttpContext.RequestAborted); if (editSession == null) { context.Result = BadRequest(); return; } page = await pageService.FindPageByIdAsync(editSession.PageId); if (page == null) { context.Result = BadRequest(); return; } var content = await pageEditingService.GetContentAsync(editSession, HttpContext.RequestAborted); rootContentContext = new ContentContext(page, content, HttpContext.RequestServices, true); string modelPath = string.Empty; if (Request.Query.TryGetValue("path", out Microsoft.Extensions.Primitives.StringValues pathValue)) { modelPath = pathValue[0]; } contentContext = rootContentContext.Navigate(modelPath); if (contentContext == null) { context.Result = BadRequest(); return; } if (!Request.Query.TryGetValue("field", out Microsoft.Extensions.Primitives.StringValues fieldNameValue)) { context.Result = BadRequest(); return; } string fieldName = fieldNameValue[0]; if (!contentContext.Explorer.Metadata.TryGetField(fieldName, out field)) { context.Result = BadRequest(); return; } await next(); }
public MeController(ILogger log, IContactService contactSrv, IMapper mapper, IPageContentService pageContentSrv) { _log = log; _contactSrv = contactSrv; _mapper = mapper; _pageContentSrv = pageContentSrv; }
public ContentSectionsController(IPageContentService pageContentService, IMappingService mappingService, IImageService imageService) : base(mappingService, imageService) { Guard.WhenArgument(pageContentService, "PageContent service is null.").IsNull().Throw(); this.pageContentService = pageContentService; }
/// <summary> /// Initializes a new instance of the <see cref="PageService" /> class. /// </summary> /// <param name="repository">The repository.</param> /// <param name="unitOfWork">The unit of work.</param> /// <param name="pagePropertiesService">The page properties service.</param> /// <param name="pageExistsService">The page exists service.</param> /// <param name="pageContentsService">The page contents service.</param> /// <param name="pageContentService">The page content service.</param> /// <param name="urlService">The URL service.</param> /// <param name="fileUrlResolver">The file URL resolver.</param> /// <param name="pageTranslationsService">The page translations service.</param> /// <param name="masterPageService">The master page service.</param> /// <param name="pageService">The page service.</param> /// <param name="sitemapService">The sitemap service.</param> /// <param name="tagService">The tag service.</param> /// <param name="accessControlService">The access control service.</param> public PageService( IRepository repository, IUnitOfWork unitOfWork, IPagePropertiesService pagePropertiesService, IPageExistsService pageExistsService, IPageContentsService pageContentsService, IPageContentService pageContentService, IUrlService urlService, IMediaFileUrlResolver fileUrlResolver, IPageTranslationsService pageTranslationsService, IMasterPageService masterPageService, Module.Pages.Services.IPageService pageService, ISitemapService sitemapService, ITagService tagService, IAccessControlService accessControlService) { this.pageContentsService = pageContentsService; this.pageContentService = pageContentService; this.pagePropertiesService = pagePropertiesService; this.pageExistsService = pageExistsService; this.repository = repository; this.urlService = urlService; this.fileUrlResolver = fileUrlResolver; this.pageTranslationsService = pageTranslationsService; }
public RedaktContext(IPageService pageService, IPageContentService contentService, IPageTypeService pageTypeService) { this.PageService = pageService; this.PageContentService = contentService; this.PageTypeService = pageTypeService; this.User = new User(); this.Site = new Site(); }
public PageService(IRepository repository, IPagePropertiesService pagePropertiesService, IPageExistsService pageExistsService, IPageContentsService pageContentsService, IPageContentService pageContentService, IUrlService urlService) { this.pageContentsService = pageContentsService; this.pageContentService = pageContentService; this.pagePropertiesService = pagePropertiesService; this.pageExistsService = pageExistsService; this.repository = repository; this.urlService = urlService; }
public HeaderViewComponent(ICatalogFunctionService catalogFunctionService, ICatalogSectorService catalogSectorService, ICategoryBlogService categoryBlogService, IPageContentService pageContentService) { _catalogFunctionService = catalogFunctionService; _catalogSectorService = catalogSectorService; _categoryBlogService = categoryBlogService; _pageContentService = pageContentService; }
public AdminController(ILogger log, IAppLogService appLogSrv, IContactService contactSrv, IArticleService articleSrv, IMapper mapper, IPageContentService pageContentSrv) { _log = log; _appLogSrv = appLogSrv; _contactSrv = contactSrv; _articleSrv = articleSrv; _mapper = mapper; _pageContentSrv = pageContentSrv; }
public PageService(IRepository repository, IPagePropertiesService pagePropertiesService, IPageExistsService pageExistsService, IPageContentsService pageContentsService, IPageContentService pageContentService, IUrlService urlService, IMediaFileUrlResolver fileUrlResolver) { this.pageContentsService = pageContentsService; this.pageContentService = pageContentService; this.pagePropertiesService = pagePropertiesService; this.pageExistsService = pageExistsService; this.repository = repository; this.urlService = urlService; this.fileUrlResolver = fileUrlResolver; }
public PageContentServiceTests() { 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>(); pageContentService = serviceScope.ServiceProvider.GetService <IPageContentService>(); pageMetadataManager = serviceScope.ServiceProvider.GetService <IPageMetadataManager>(); }
public BaseController(IPageContentService pageContentService, IProductsService productsService) { this.pageContentService = pageContentService; this.productsService = productsService; }
public HomeController(IPageContentService pageContentService, IProductsService productsService) : base(pageContentService, productsService) { }
public IntegrateController(IPageContentService pageContentService, IWebImageService webImageService) { _pageContentService = pageContentService; _webImageService = webImageService; }
public PageController(IPageService pageService, IPageTypeService pageTypeService, IPageContentService pageContentService) { _pageService = pageService; _pageTypeService = pageTypeService; _pageContentService = pageContentService; }
public HomeController(IHomeService homeService, IPageContentService contentService) { this.homeService = homeService; this.contentService = contentService; }
public FooterViewComponent(IInfoService infoService, IPageContentService pageContentService) { _infoService = infoService; _pageContentService = pageContentService; }
public PageContentController(IPageContentService pageContentRepository) { _pageContentService = pageContentRepository; }
public PageContentController(ILogger <PageContentController> logger, IPageContentService service) { _logger = logger; _service = service; }
public HomeController(IPageContentService _pageServices, IConfiguration config, ICommonService _serv) { PageService = _pageServices; BaseUrl = config.GetValue <string>("FilePath"); serv = _serv; }
public PageContentController(IPageService pageService, IPageContentService pageContentService, Url.IPageLinkGenerator pageLinkGenerator) { this.pageService = pageService ?? throw new ArgumentNullException(nameof(pageService)); this.pageContentService = pageContentService ?? throw new ArgumentNullException(nameof(pageContentService)); this.pageLinkGenerator = pageLinkGenerator ?? throw new ArgumentNullException(nameof(pageLinkGenerator)); }
public HomeController(IPageContentService pageContentService, IAuthenticationService authenticationService) { _pageContentService = pageContentService; _authenticationService = authenticationService; }
public PageController(IPageContentService contentService) { this.contentService = contentService; }
public ContentController(IPageContentService pageContentService) { _pageContentService = pageContentService; }
public WhereToBuyController(IPageContentService pageContentService, IProductsService productsService, IRetailerService retailerService) : base(pageContentService, productsService) { this.retailerService = retailerService; }