Initial commit - Pingerino network monitoring application
هذا الالتزام موجود في:
31
Services/Interfaces/INetworkService.cs
Normal file
31
Services/Interfaces/INetworkService.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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<string> GetPublicIpAddressAsync(CancellationToken cancellationToken = default);
|
||||
System.Threading.Tasks.Task<List<NetworkAdapterInfo>> GetNetworkAdaptersAsync();
|
||||
System.Threading.Tasks.Task<bool> ResetNetworkAdapterAsync(string adapterName, IProgress<int> progress = null, CancellationToken cancellationToken = default);
|
||||
System.Threading.Tasks.Task<NetworkAdapterInfo> GetActiveEthernetAdapterAsync();
|
||||
System.Threading.Tasks.Task<bool> 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<string> DnsServers { get; set; } = new List<string>();
|
||||
public bool IsActive { get; set; }
|
||||
public string InterfaceType { get; set; }
|
||||
}
|
||||
}
|
المرجع في مشكلة جديدة
حظر مستخدم