From 21ba48f3465f62d3a1ba42cbf8caf9a9a4cbbb24 Mon Sep 17 00:00:00 2001 From: Melwyn Lobo Date: Sun, 29 Mar 2020 18:55:16 +0530 Subject: [PATCH 1/5] Migrated from .Net framework 4.5 to .Net Core 2.1 --- .vscode/launch.json | 27 ++++ .vscode/tasks.json | 42 +++++++ .../IPNetworkExists.cs | 4 +- .../LukeSkywalker.IPNetwork.Test.csproj | 96 ++------------ .../Properties/AssemblyInfo.cs | 36 ------ LukeSkywalker.IPNetwork.sln | 48 +++++-- .../IPAddressCollection.cs | 5 +- LukeSkywalker.IPNetwork/IPNetwork.cs | 6 +- .../IPNetworkCollection.cs | 5 +- .../LukeSkywalker.IPNetwork.csproj | 118 +----------------- LukeSkywalker.IPNetwork/LukeSkywalker.snk | Bin 596 -> 0 bytes .../Properties/AssemblyInfo.cs | 36 ------ 12 files changed, 129 insertions(+), 294 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json delete mode 100644 LukeSkywalker.IPNetwork.Test/Properties/AssemblyInfo.cs delete mode 100644 LukeSkywalker.IPNetwork/LukeSkywalker.snk delete mode 100644 LukeSkywalker.IPNetwork/Properties/AssemblyInfo.cs diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8fab02c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/LukeSkywalker.IPNetwork.Test/bin/Debug/netcoreapp2.1/LukeSkywalker.IPNetwork.Test.dll", + "args": [], + "cwd": "${workspaceFolder}/LukeSkywalker.IPNetwork.Test", + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..d2f637a --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,42 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/LukeSkywalker.IPNetwork.Test/LukeSkywalker.IPNetwork.Test.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/LukeSkywalker.IPNetwork.Test/LukeSkywalker.IPNetwork.Test.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "${workspaceFolder}/LukeSkywalker.IPNetwork.Test/LukeSkywalker.IPNetwork.Test.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/LukeSkywalker.IPNetwork.Test/IPNetworkExists.cs b/LukeSkywalker.IPNetwork.Test/IPNetworkExists.cs index 66de4ee..0ba8d83 100644 --- a/LukeSkywalker.IPNetwork.Test/IPNetworkExists.cs +++ b/LukeSkywalker.IPNetwork.Test/IPNetworkExists.cs @@ -1,6 +1,4 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using LukeSkywalker.IPNetwork; +using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Net; namespace LukeSkywalker.IPNetwork.Test diff --git a/LukeSkywalker.IPNetwork.Test/LukeSkywalker.IPNetwork.Test.csproj b/LukeSkywalker.IPNetwork.Test/LukeSkywalker.IPNetwork.Test.csproj index 805c695..5d72708 100644 --- a/LukeSkywalker.IPNetwork.Test/LukeSkywalker.IPNetwork.Test.csproj +++ b/LukeSkywalker.IPNetwork.Test/LukeSkywalker.IPNetwork.Test.csproj @@ -1,89 +1,19 @@ - - + + - Debug - AnyCPU - {F17EC671-EE74-419D-AE33-FD9F07221DE0} - Library - Properties - LukeSkywalker.IPNetwork.Test - LukeSkywalker.IPNetwork.Test - v4.5 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest + netcoreapp2.1 + + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - + - - + + + + - - {e76938d8-edec-4568-b73c-b98c41044423} - LukeSkywalker.IPNetwork - + - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file + + diff --git a/LukeSkywalker.IPNetwork.Test/Properties/AssemblyInfo.cs b/LukeSkywalker.IPNetwork.Test/Properties/AssemblyInfo.cs deleted file mode 100644 index bb2f91a..0000000 --- a/LukeSkywalker.IPNetwork.Test/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("LukeSkywalker.IPNetwork.Test")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("LukeSkywalker.IPNetwork.Test")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b2f3ad99-7c83-448a-b3d8-50627ef7aec8")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/LukeSkywalker.IPNetwork.sln b/LukeSkywalker.IPNetwork.sln index 333d7f1..4ee87fc 100644 --- a/LukeSkywalker.IPNetwork.sln +++ b/LukeSkywalker.IPNetwork.sln @@ -1,26 +1,48 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LukeSkywalker.IPNetwork", "LukeSkywalker.IPNetwork\LukeSkywalker.IPNetwork.csproj", "{E76938D8-EDEC-4568-B73C-B98C41044423}" +# Visual Studio 15 +VisualStudioVersion = 15.0.26124.0 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LukeSkywalker.IPNetwork", "LukeSkywalker.IPNetwork\LukeSkywalker.IPNetwork.csproj", "{30B42A79-7D39-4EF6-9E9F-377F5E7694A1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LukeSkywalker.IPNetwork.Test", "LukeSkywalker.IPNetwork.Test\LukeSkywalker.IPNetwork.Test.csproj", "{F17EC671-EE74-419D-AE33-FD9F07221DE0}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LukeSkywalker.IPNetwork.Test", "LukeSkywalker.IPNetwork.Test\LukeSkywalker.IPNetwork.Test.csproj", "{1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E76938D8-EDEC-4568-B73C-B98C41044423}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E76938D8-EDEC-4568-B73C-B98C41044423}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E76938D8-EDEC-4568-B73C-B98C41044423}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E76938D8-EDEC-4568-B73C-B98C41044423}.Release|Any CPU.Build.0 = Release|Any CPU - {F17EC671-EE74-419D-AE33-FD9F07221DE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F17EC671-EE74-419D-AE33-FD9F07221DE0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F17EC671-EE74-419D-AE33-FD9F07221DE0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F17EC671-EE74-419D-AE33-FD9F07221DE0}.Release|Any CPU.Build.0 = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Debug|x64.ActiveCfg = Debug|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Debug|x64.Build.0 = Debug|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Debug|x86.ActiveCfg = Debug|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Debug|x86.Build.0 = Debug|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Release|Any CPU.Build.0 = Release|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Release|x64.ActiveCfg = Release|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Release|x64.Build.0 = Release|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Release|x86.ActiveCfg = Release|Any CPU + {30B42A79-7D39-4EF6-9E9F-377F5E7694A1}.Release|x86.Build.0 = Release|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Debug|x64.ActiveCfg = Debug|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Debug|x64.Build.0 = Debug|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Debug|x86.ActiveCfg = Debug|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Debug|x86.Build.0 = Debug|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Release|Any CPU.Build.0 = Release|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Release|x64.ActiveCfg = Release|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Release|x64.Build.0 = Release|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Release|x86.ActiveCfg = Release|Any CPU + {1E8A5554-AFB4-413A-8A8F-81E6B76C10B2}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection EndGlobal diff --git a/LukeSkywalker.IPNetwork/IPAddressCollection.cs b/LukeSkywalker.IPNetwork/IPAddressCollection.cs index ef5d147..5ed01d3 100644 --- a/LukeSkywalker.IPNetwork/IPAddressCollection.cs +++ b/LukeSkywalker.IPNetwork/IPAddressCollection.cs @@ -1,11 +1,10 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Net; using System.Collections; -namespace LukeSkywalker.IPNetwork { +namespace LukeSkywalker.IPNetwork +{ public class IPAddressCollection : IEnumerable, IEnumerator { private IPNetwork _ipnetwork; diff --git a/LukeSkywalker.IPNetwork/IPNetwork.cs b/LukeSkywalker.IPNetwork/IPNetwork.cs index 3504550..1c05ca5 100644 --- a/LukeSkywalker.IPNetwork/IPNetwork.cs +++ b/LukeSkywalker.IPNetwork/IPNetwork.cs @@ -1,13 +1,11 @@ using System; using System.Collections.Generic; -using System.Text; using System.Net; -using System.Net.Sockets; using System.Text.RegularExpressions; -using System.Collections; using System.IO; -namespace LukeSkywalker.IPNetwork { +namespace LukeSkywalker.IPNetwork +{ /// /// IP Network utility class. /// Use IPNetwork.Parse to create instances. diff --git a/LukeSkywalker.IPNetwork/IPNetworkCollection.cs b/LukeSkywalker.IPNetwork/IPNetworkCollection.cs index c366e84..93b9eb0 100644 --- a/LukeSkywalker.IPNetwork/IPNetworkCollection.cs +++ b/LukeSkywalker.IPNetwork/IPNetworkCollection.cs @@ -1,10 +1,9 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Collections; -namespace LukeSkywalker.IPNetwork { +namespace LukeSkywalker.IPNetwork +{ public class IPNetworkCollection : IEnumerable, IEnumerator { diff --git a/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj b/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj index 4e2446f..9f5c4f4 100644 --- a/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj +++ b/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj @@ -1,115 +1,7 @@ - - + + - Debug - AnyCPU - 9.0.21022 - 2.0 - {E76938D8-EDEC-4568-B73C-B98C41044423} - Library - Properties - LukeSkywalker.IPNetwork - LukeSkywalker.IPNetwork - v4.5 - 512 - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - SAK - SAK - SAK - SAK - + netstandard2.0 - - true - full - false - ..\binaries\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - false - - - pdbonly - true - ..\binaries\Release\ - TRACE - prompt - 4 - AllRules.ruleset - false - - - true - - - LukeSkywalker.snk - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - - - \ No newline at end of file + + diff --git a/LukeSkywalker.IPNetwork/LukeSkywalker.snk b/LukeSkywalker.IPNetwork/LukeSkywalker.snk deleted file mode 100644 index 7776aef6f04f9b7f7c5e5a13d0a0e7310063d617..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50098g@m-Gh2ogo9T+w*_H-{&Dt{V)d^(7ASm~GJwA>maGxOoZcb+IPay4CqyoMnOVD~q)& zMbT~4OM1j zn-6|-f57Dvfh*(rfn@+z1f^gVK#GY$ifa8%_=!0;-5H(1Y|srnrX|q}`_2qQy{aZD zR%K{T{P@b&Nd|Hgwg=i+xqfK=QI*Um0oDv>O=t_$l-f=IFeazs>Cok)6IF^n#7hMt zSWz?)Mo;vPeAc;ZJWZ8hMB~7`cE3a5KJqk}HHb`s!ZDyp{`p*9aNLtT3wx#&YqYo> z{NX~YO%*sQ^_^24sT=+3D>Ken;F*8sx}(piHYXwf_HEzf%^S0KV`RY3;wrwoFI(lV zl=>c%C@1Aer Date: Sun, 29 Mar 2020 19:00:56 +0530 Subject: [PATCH 2/5] Changed README information --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21e973e..1fbc9b8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ IPNetwork ========= -A fork from codeplex (ipnetwork.codeplex.com) LukeWalker.IPNetwork without GPL code reference AND compiled to .NET 4.5 +A fork from codeplex (ipnetwork.codeplex.com) LukeWalker.IPNetwork without GPL code reference AND compiled to .NET Core 2.1 This is used for comparing Network address within a range (CIDR) To obtain CIDR: http://www.subnet-calculator.com/cidr.php From cd527843d5f23517a5d7203335f18dee10346437 Mon Sep 17 00:00:00 2001 From: Melwyn Lobo Date: Sun, 29 Mar 2020 19:21:58 +0530 Subject: [PATCH 3/5] Added Repository URL in csproj file --- LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj b/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj index 9f5c4f4..97a069c 100644 --- a/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj +++ b/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj @@ -2,6 +2,7 @@ netstandard2.0 + https://github.com/LoboMelwyn/IPNetwork From 7a023fdf22cfb73f14946211449544afbf2fc0d6 Mon Sep 17 00:00:00 2001 From: Melwyn Lobo Date: Sun, 29 Mar 2020 19:25:38 +0530 Subject: [PATCH 4/5] made value of repository URL lowercase --- LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj b/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj index 97a069c..7c6d566 100644 --- a/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj +++ b/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj @@ -2,7 +2,7 @@ netstandard2.0 - https://github.com/LoboMelwyn/IPNetwork + https://github.com/lobomelwyn/ipnetwork From fa7f6a76c89700b27e273d93b495d0790c0dc78a Mon Sep 17 00:00:00 2001 From: Melwyn Lobo Date: Mon, 30 Mar 2020 11:31:08 +0530 Subject: [PATCH 5/5] Added Package ID and Version --- LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj b/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj index 7c6d566..ff339e9 100644 --- a/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj +++ b/LukeSkywalker.IPNetwork/LukeSkywalker.IPNetwork.csproj @@ -2,6 +2,8 @@ netstandard2.0 + IPNetwork + 2.1.0 https://github.com/lobomelwyn/ipnetwork