Files
PowerToys/src/modules/Hosts/HostsUILib/Helpers/IHostsService.cs

30 lines
686 B
C#
Raw Normal View History

2022-10-13 13:05:43 +02:00
// 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;
using System.Collections.Generic;
using System.Threading.Tasks;
using HostsUILib.Models;
2022-10-13 13:05:43 +02:00
namespace HostsUILib.Helpers
2022-10-13 13:05:43 +02:00
{
public interface IHostsService
2022-10-13 13:05:43 +02:00
{
string HostsFilePath { get; }
event EventHandler FileChanged;
Task<HostsData> ReadAsync();
2022-10-13 13:05:43 +02:00
Task WriteAsync(string additionalLines, IEnumerable<Entry> entries);
2022-10-13 13:05:43 +02:00
Task<bool> PingAsync(string address);
void OpenHostsFile();
void RemoveReadOnlyAttribute();
2022-10-13 13:05:43 +02:00
}
}