From ba17366094ec0275343d23b2b1968728bf64f036 Mon Sep 17 00:00:00 2001 From: ChsBuffer <33744752+chsbuffer@users.noreply.github.com> Date: Sun, 28 Mar 2021 03:32:14 +0800 Subject: [PATCH] trim --- Netch/Models/IAdapter.cs | 2 -- Netch/Models/OutboundAdapter.cs | 4 +--- Netch/Models/TunAdapter.cs | 5 +---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Netch/Models/IAdapter.cs b/Netch/Models/IAdapter.cs index 5f36fcfa..5f292f69 100644 --- a/Netch/Models/IAdapter.cs +++ b/Netch/Models/IAdapter.cs @@ -5,8 +5,6 @@ namespace Netch.Models { public interface IAdapter { - string AdapterId { get; } - int InterfaceIndex { get; } IPAddress Gateway { get; } diff --git a/Netch/Models/OutboundAdapter.cs b/Netch/Models/OutboundAdapter.cs index 33d9e6cd..6178e90d 100644 --- a/Netch/Models/OutboundAdapter.cs +++ b/Netch/Models/OutboundAdapter.cs @@ -29,9 +29,7 @@ namespace Netch.Models Logging.Info($"出口适配器:{NetworkInterface.Name} {NetworkInterface.Id} {NetworkInterface.Description}, index: {InterfaceIndex}"); } - public IPAddress Address { get; set; } - - public string AdapterId => throw new NotImplementedException(); + public IPAddress Address { get; } /// /// 索引 diff --git a/Netch/Models/TunAdapter.cs b/Netch/Models/TunAdapter.cs index d3007536..8432d11b 100644 --- a/Netch/Models/TunAdapter.cs +++ b/Netch/Models/TunAdapter.cs @@ -1,8 +1,6 @@ -using System; -using System.Linq; +using System.Linq; using System.Net; using System.Net.NetworkInformation; -using Netch.Controllers; using Netch.Interops; using Netch.Utils; @@ -19,7 +17,6 @@ namespace Netch.Models Logging.Info($"WinTUN 适配器:{NetworkInterface.Name} {NetworkInterface.Id} {NetworkInterface.Description}, index: {InterfaceIndex}"); } - public string AdapterId => throw new NotImplementedException(); public int InterfaceIndex { get; }