[Hosts]Duplicate check improvements (#32805)

* moved duplicate check in a dedicate service and made it async

* addressed feedback
This commit is contained in:
Davide Giacometti
2024-06-03 11:26:05 +02:00
committed by GitHub
parent e2f1ad6d40
commit c00f37c8d7
7 changed files with 200 additions and 121 deletions

View File

@@ -0,0 +1,16 @@
// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using HostsUILib.Models;
namespace HostsUILib.Helpers
{
public interface IDuplicateService
{
void Initialize(IList<Entry> entries);
void CheckDuplicates(string address, string[] hosts);
}
}