Projekt

Obecné

Profil

Stáhnout (2.09 KB) Statistiky
| Větev: | Tag: | Revize:
1
using Core.Entities;
2
using System;
3
using System.Collections.Generic;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7
using static Core.Services.HTMLService;
8

    
9
namespace Core.Services
10
{
11
    public interface IHTMLService
12
    {
13
        /// <summary>
14
        /// Make a full preprocessing of an HTML document and incorporate any existing tags into it
15
        /// </summary>
16
        /// <param name="htmlSource"></param>
17
        /// <param name="tags"></param>
18
        /// <returns>tuple of (HTML document to render, info to cache in the database)</returns>
19
        public (string, CachedInfo) FullPreprocessHTML(string htmlSource, List<AnnotationTagGeneric> tags);
20
        /// <summary>
21
        /// Make a partial preprocessing of an HTML document by adding a new tag into it
22
        /// </summary>
23
        /// <param name="htmlToEdit">already preprocessed HTML document</param>
24
        /// <param name="htmlOriginal">original HTML document</param>
25
        /// <param name="tagToAdd">the tag to add</param>
26
        /// <param name="tags">list of all tags related to the annotation</param>
27
        /// <param name="cachedInfo">database-cached info</param>
28
        /// <returns></returns>
29
        public (string, CachedInfo) PartialPreprocessHTMLAddTag(string htmlToEdit, string htmlOriginal, AnnotationTagGeneric tagToAdd, List<AnnotationTagGeneric> tags, CachedInfo cachedInfo);
30
        /// <summary>
31
        /// Make a partial preprocessing of an HTML document by remove an existing tag from it
32
        /// </summary>
33
        /// <param name="htmlToEdit">already preprocessed HTML document</param>
34
        /// <param name="htmlOriginal">original HTML document</param>
35
        /// <param name="tagToRemove">the tag to remove</param>
36
        /// <param name="tags">list of all tags related to the annotation</param>
37
        /// <param name="cachedInfo">database-cached info</param>
38
        /// <returns></returns>
39
        public (string, CachedInfo) PartialPreprocessHTMLRemoveTag(string htmlToEdit, string htmlOriginal, AnnotationTagGeneric tagToRemove, List<AnnotationTagGeneric> tags, CachedInfo cachedInfo);
40
    }
41
}
(2-2/2)