using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace Pingerino.Services.Interfaces { public interface INetworkService : IDisposable { System.Threading.Tasks.Task GetPublicIpAddressAsync(CancellationToken cancellationToken = default); System.Threading.Tasks.Task> GetNetworkAdaptersAsync(); System.Threading.Tasks.Task ResetNetworkAdapterAsync(string adapterName, IProgress progress = null, CancellationToken cancellationToken = default); System.Threading.Tasks.Task GetActiveEthernetAdapterAsync(); System.Threading.Tasks.Task IsNetworkAvailableAsync(); } public class NetworkAdapterInfo { public string Name { get; set; } public string Description { get; set; } public string PhysicalAddress { get; set; } public bool IsDhcpEnabled { get; set; } public string IpAddress { get; set; } public string SubnetMask { get; set; } public string DefaultGateway { get; set; } public string DhcpServer { get; set; } public List DnsServers { get; set; } = new List(); public bool IsActive { get; set; } public string InterfaceType { get; set; } } }