You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
802 B
34 lines
802 B
2 years ago
|
using Biskilog_Cloud.Shared.Interfaces;
|
||
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Text;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace Biskilog_Cloud.Shared.ServiceRepo
|
||
|
{
|
||
|
public class SearchService : ISearchService
|
||
|
{
|
||
|
public event Action<string> SearchValueChanged;
|
||
|
public event Action ClearTextBox;
|
||
|
|
||
|
// 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();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|