diff --git a/ClientTest/ClientTest.csproj b/ClientTest/ClientTest.csproj index 1df0586a..59eb01f8 100644 --- a/ClientTest/ClientTest.csproj +++ b/ClientTest/ClientTest.csproj @@ -20,9 +20,9 @@ - + - + all diff --git a/Stardust.ServerTests/Stardust.ServerTests.csproj b/Stardust.ServerTests/Stardust.ServerTests.csproj index 1a6e4fa3..1b2a7ffd 100644 --- a/Stardust.ServerTests/Stardust.ServerTests.csproj +++ b/Stardust.ServerTests/Stardust.ServerTests.csproj @@ -21,7 +21,7 @@ - + diff --git a/Stardust/LocalStarClient.cs b/Stardust/LocalStarClient.cs index fc83b528..066d644e 100644 --- a/Stardust/LocalStarClient.cs +++ b/Stardust/LocalStarClient.cs @@ -447,15 +447,6 @@ public static IEnumerable Scan(AgentInfo local = null, Int32 timeout var rs = new DefaultMessage(); IPEndPoint ep = null; buf = udp.Receive(ref ep); -#if NET40 - if (buf != null && rs.Read(buf) && encoder.Decode(rs, out var action, out _, out var data)) - { - var js = encoder.DecodeResult(action, data, rs); - var info = (AgentInfo)encoder.Convert(js, typeof(AgentInfo)); - - yield return info; - } -#else if (buf != null && rs.Read(buf)) { var msg = encoder.Decode(rs); @@ -467,7 +458,6 @@ public static IEnumerable Scan(AgentInfo local = null, Int32 timeout yield return info; } } -#endif } } #endregion diff --git a/Stardust/Models/AppInfo.cs b/Stardust/Models/AppInfo.cs index 96c7ecda..7e80351f 100644 --- a/Stardust/Models/AppInfo.cs +++ b/Stardust/Models/AppInfo.cs @@ -132,11 +132,7 @@ public void Refresh() try { // 调用WindowApi获取进程的连接数 -#if NET40 - var tcps = NetHelper.GetAllTcpConnections(); -#else var tcps = NetHelper.GetAllTcpConnections(-1); -#endif if (tcps != null && tcps.Length > 0) { Connections = tcps.Count(e => e.ProcessId == Id); diff --git a/Stardust/StarClient.cs b/Stardust/StarClient.cs index 9926d4a8..7f5edf21 100644 --- a/Stardust/StarClient.cs +++ b/Stardust/StarClient.cs @@ -221,9 +221,7 @@ public NodeInfo GetNodeInfo() DriveInfo = drives.Join(",", e => $"{e.Name}[{e.DriveFormat}]={e.AvailableFreeSpace.ToGMK()}/{e.TotalSize.ToGMK()}"), Product = mi.Product, -#if !NET40 Vendor = mi.Vendor, -#endif Processor = mi.Processor, CpuRate = mi.CpuRate, UUID = mi.UUID, diff --git a/Stardust/Stardust.csproj b/Stardust/Stardust.csproj index de851bd2..f58f3466 100644 --- a/Stardust/Stardust.csproj +++ b/Stardust/Stardust.csproj @@ -86,11 +86,11 @@ - - + + - + diff --git a/Test/Test.csproj b/Test/Test.csproj index f1507bbd..54e56b67 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -25,7 +25,7 @@ - +