Exemplo n.º 1
0
 public CustomPageController(
     ILogger <CustomPageController> logger,
     IOptions <AppSettings> settings,
     CustomPageService customPageService) : base(logger, settings)
 {
     _customPageService = customPageService;
 }
Exemplo n.º 2
0
        public void TestRemoveScriptTagFromHtml()
        {
            var html   = @"<p>Microsoft</p><p>Rocks!</p><p>Azure <br /><script>console.info('hey');</script><img src=""a.jpg"" /> The best <span>cloud</span>!</p>";
            var output = CustomPageService.RemoveScriptTagFromHtml(html);

            Assert.IsTrue(output == @"<p>Microsoft</p><p>Rocks!</p><p>Azure <br /><img src=""a.jpg"" /> The best <span>cloud</span>!</p>");
        }
        public IHttpActionResult PostCustomPage(CustomPage customPage)
        {
            CustomPageService customPageService = new CustomPageService();

            customPageService.UpsertCustomPage(customPage, db);

            return(CreatedAtRoute("DefaultApi", new { id = customPage.PageId }, customPage));
        }
Exemplo n.º 4
0
 public CustomPageController(
     ILogger <CustomPageController> logger,
     IOptions <AppSettings> settings,
     CustomPageService customPageService,
     IMoongladeAudit moongladeAudit) : base(logger, settings)
 {
     _customPageService = customPageService;
     _moongladeAudit    = moongladeAudit;
 }
Exemplo n.º 5
0
        public void TestRemoveWhiteSpaceFromStylesheets()
        {
            var css    = @"h1 {
                            color: red;
                        }";
            var output = CustomPageService.RemoveWhiteSpaceFromStylesheets(css);

            Assert.IsTrue(output == "h1{color:red}");
        }
Exemplo n.º 6
0
        public IHttpActionResult GetCustomPage(string id)
        {
            CustomPageService customPageService = new CustomPageService();



            var pages = customPageService.GetAllPagesByClientUrl(id, db);



            return(Ok(pages));
        }
Exemplo n.º 7
0
        public IHttpActionResult GetPagesByClient(string id, NewClientWebPagesDBEntities db)
        {
            CustomPageService customPageService = new CustomPageService();

            // var content = webContentService.GetWebContentByPageId(id, db);

            var pages = customPageService.GetAllPagesByClientUrl(id, db);



            return(Ok(pages));
        }
Exemplo n.º 8
0
        public BlogGraphController(
            ILogger <BlogGraphController> logger,
            TagService tagService,
            CategoryService categoryService,
            PostService postService,
            CustomPageService customPageService)
        {
            _logger = logger;

            _tagService        = tagService;
            _categoryService   = categoryService;
            _postService       = postService;
            _customPageService = customPageService;
        }