From fcc92654d26f2761032f297708d637c2baf20492 Mon Sep 17 00:00:00 2001 From: Lucas Maximiliano Marino Date: Wed, 4 Aug 2021 13:21:13 +0300 Subject: [PATCH] feat: add new methods to IFilterService for bulk filtering --- .../IFilterService.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/Thankifi.Common.Filters.Abstractions/IFilterService.cs b/src/Thankifi.Common.Filters.Abstractions/IFilterService.cs index 61dc6d7..a6c5427 100644 --- a/src/Thankifi.Common.Filters.Abstractions/IFilterService.cs +++ b/src/Thankifi.Common.Filters.Abstractions/IFilterService.cs @@ -1,4 +1,6 @@ using System; +using System.Collections; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.VisualBasic; @@ -29,5 +31,24 @@ public interface IFilterService /// . /// The transformed string or default if something went wrong.. Task ApplyOrDefault(string filter, string str, CancellationToken cancellationToken = default); + + /// + /// Applies one or more filters to a string given a filter identifier and an input string. + /// + /// The list with the identifiers of the s to apply. + /// The incoming string. + /// . + /// When the requested filter does not exists. + /// The transformed string. + Task Apply(IEnumerable filters, string str, CancellationToken cancellationToken = default); + + /// + /// Applies one or more filter to a string given a filter identifier and an input string. + /// + /// The list with the identifiers of the s to apply. + /// The incoming string. + /// . + /// The transformed string or default if something went wrong.. + Task ApplyOrDefault(IEnumerable filters, string str, CancellationToken cancellationToken = default); } } \ No newline at end of file