using Biskilog_Accounting.Shared.Interfaces; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Biskilog_Accounting.Shared.ServiceRepo { public class SearchService : ISearchService { public event Action SearchValueChanged; public event Action ClearTextBox; public event Action CloseMenus; // Method that raises the event protected virtual void OnSearchValueChanged(string a_searchKey) { SearchValueChanged?.Invoke(a_searchKey); } // Method that triggers the event public void PerformSearch(string a_searchKey) { OnSearchValueChanged(a_searchKey); } public void Clear() { ClearTextBox?.Invoke(); } public void FireCloseMenus(string a_sender) { CloseMenus?.Invoke(a_sender); } } }