Add multiple tags fluent helper#40
Conversation
|
|
||
| public static class HtmlSanitizerGroupFluentHelper | ||
| { | ||
| public record HtmlSanitizerTagRules(IReadOnlyCollection<HtmlSanitizerTagRule> RuleList); |
There was a problem hiding this comment.
Is it really needed to define HtmlSanitizerTagRules? Can't we simply have the Tags() extension method return a collection of HtmlSanitizerTagRule and have the other extension methods act on such a collection?
It would save defining a type, but I guess it would result in a lot of clutter on the intellisense as all LINQ methods are also available on that collection. I'm not really sure on what the best option is. Are there any examples in other libraries?
|
Hi @leotsarev , yes, I think this suggestion makes sense: it makes is much easier to define large rule sets. I have added a comment on regarding the record you defined, please have a look. |
This is concept of group fluent tag helper.
Do you like it?