diff --git a/PortProxyGUI - NET35/PortProxyGUI.cs b/PortProxyGUI - NET35/PortProxyGUI.cs
index e64333e..1652288 100644
--- a/PortProxyGUI - NET35/PortProxyGUI.cs
+++ b/PortProxyGUI - NET35/PortProxyGUI.cs
@@ -1,4 +1,4 @@
-using PortProxyGUI._extern.NStandard;
+using NStandard;
using System;
using System.Data;
using System.Linq;
diff --git a/PortProxyGUI - NET35/SetProxyForm.cs b/PortProxyGUI - NET35/SetProxyForm.cs
index 0f44fe9..6158f4f 100644
--- a/PortProxyGUI - NET35/SetProxyForm.cs
+++ b/PortProxyGUI - NET35/SetProxyForm.cs
@@ -1,4 +1,4 @@
-using PortProxyGUI._extern.NStandard;
+using NStandard;
using System;
using System.Linq;
using System.Text.RegularExpressions;
diff --git a/PortProxyGUI - NET45/PortProxyGUI - NET45.csproj b/PortProxyGUI - NET45/PortProxyGUI - NET45.csproj
index 87900e8..d894b95 100644
--- a/PortProxyGUI - NET45/PortProxyGUI - NET45.csproj
+++ b/PortProxyGUI - NET45/PortProxyGUI - NET45.csproj
@@ -12,6 +12,9 @@
512
true
false
+
+
+
publish\
true
Disk
@@ -27,9 +30,6 @@
false
true
true
-
-
-
AnyCPU
@@ -174,11 +174,11 @@
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
\ No newline at end of file
diff --git a/PortProxyGUI - NET45/PortProxyGUI.cs b/PortProxyGUI - NET45/PortProxyGUI.cs
index e64333e..1652288 100644
--- a/PortProxyGUI - NET45/PortProxyGUI.cs
+++ b/PortProxyGUI - NET45/PortProxyGUI.cs
@@ -1,4 +1,4 @@
-using PortProxyGUI._extern.NStandard;
+using NStandard;
using System;
using System.Data;
using System.Linq;
diff --git a/PortProxyGUI - NET45/SetProxyForm.cs b/PortProxyGUI - NET45/SetProxyForm.cs
index 0f44fe9..6158f4f 100644
--- a/PortProxyGUI - NET45/SetProxyForm.cs
+++ b/PortProxyGUI - NET45/SetProxyForm.cs
@@ -1,4 +1,4 @@
-using PortProxyGUI._extern.NStandard;
+using NStandard;
using System;
using System.Linq;
using System.Text.RegularExpressions;
diff --git a/PortProxyGUI - NET45/app.config b/PortProxyGUI - NET45/app.config
index b3797c6..c81d505 100644
--- a/PortProxyGUI - NET45/app.config
+++ b/PortProxyGUI - NET45/app.config
@@ -1,17 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/PortProxyGUI.Shared/CmdUtil.cs b/PortProxyGUI.Shared/CmdUtil.cs
index 7a0f3d0..0103fda 100644
--- a/PortProxyGUI.Shared/CmdUtil.cs
+++ b/PortProxyGUI.Shared/CmdUtil.cs
@@ -1,4 +1,4 @@
-using PortProxyGUI._extern.NStandard;
+using NStandard;
using PortProxyGUI.Data;
using System;
using System.Linq;
@@ -22,7 +22,7 @@ namespace PortProxyGUI
var proxies = types.SelectMany(type =>
{
var typeProxies = output
- .Project(new Regex($@"{type.From}:[^\n]+?{type.To}:\r\n\r\n.+?\r\n--------------- ---------- --------------- ----------\r\n(.+?)\r\n\r\n", RegexOptions.Singleline))
+ .ExtractFirst(new Regex($@"{type.From}:[^\n]+?{type.To}:\r\n\r\n.+?\r\n--------------- ---------- --------------- ----------\r\n(.+?)\r\n\r\n", RegexOptions.Singleline))
?.Split(new[] { Environment.NewLine }, StringSplitOptions.None)
.Select(line =>
{
diff --git a/PortProxyGUI.Shared/PortProxyGUI.Shared.projitems b/PortProxyGUI.Shared/PortProxyGUI.Shared.projitems
index 2b9d8b6..4b76964 100644
--- a/PortProxyGUI.Shared/PortProxyGUI.Shared.projitems
+++ b/PortProxyGUI.Shared/PortProxyGUI.Shared.projitems
@@ -18,7 +18,5 @@
-
-
\ No newline at end of file
diff --git a/PortProxyGUI.Shared/~extern/NStandard/XObject.cs b/PortProxyGUI.Shared/~extern/NStandard/XObject.cs
deleted file mode 100644
index e023a6c..0000000
--- a/PortProxyGUI.Shared/~extern/NStandard/XObject.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.ComponentModel;
-
-namespace PortProxyGUI._extern.NStandard
-{
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static class XObject
- {
- ///
- /// Do a task for itself, then return itself.
- ///
- ///
- ///
- ///
- ///
- public static TSelf Then(this TSelf @this, Action task)
- {
- task(@this);
- return @this;
- }
-
- }
-}
diff --git a/PortProxyGUI.Shared/~extern/NStandard/XString.cs b/PortProxyGUI.Shared/~extern/NStandard/XString.cs
deleted file mode 100644
index 3c05395..0000000
--- a/PortProxyGUI.Shared/~extern/NStandard/XString.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Linq;
-using System.Text.RegularExpressions;
-
-namespace PortProxyGUI._extern.NStandard
-{
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static class XString
- {
- ///
- /// Indicates whether the string matches the specified regular expression.
- ///
- ///
- ///
- ///
- public static bool IsMatch(this string @this, Regex regex) => regex.Match(@this).Success;
-
- ///
- /// Projects the specified string to a new string by using regular expressions.
- /// If there is no match, this method returns null.
- ///
- ///
- ///
- ///
- ///
- public static string Project(this string @this, Regex regex, string target = null)
- {
- var match = regex.Match(@this);
- if (match.Success)
- {
- if (target is null)
- return string.Join("", match.Groups.OfType().Skip(1).Select(g => g.Value).ToArray());
- else return regex.Replace(match.Groups[0].Value, target);
- }
- else return null;
- }
-
- ///
- /// Projects the specified string to an array by using regular expressions.
- ///
- ///
- ///
- ///
- public static string[][] Resolve(this string @this, Regex regex)
- {
- if (TryResolve(@this, regex, out var ret)) return ret;
- else throw new ArgumentNullException("Can not match the sepecifed Regex.");
- }
-
- ///
- /// Projects the specified string to an array by using regular expressions.
- ///
- ///
- ///
- ///
- public static bool TryResolve(this string @this, Regex regex, out string[][] ret)
- {
- var match = regex.Match(@this);
- if (match.Success)
- {
- ret = match.Groups.OfType()
- .Select(g => g.Captures.OfType().Select(c => c.Value).ToArray()).ToArray();
- return true;
- }
- else
- {
- ret = null;
- return false;
- }
- }
-
- }
-}
diff --git a/PortProxyGUI/PortProxyGUI.cs b/PortProxyGUI/PortProxyGUI.cs
index e64333e..1652288 100644
--- a/PortProxyGUI/PortProxyGUI.cs
+++ b/PortProxyGUI/PortProxyGUI.cs
@@ -1,4 +1,4 @@
-using PortProxyGUI._extern.NStandard;
+using NStandard;
using System;
using System.Data;
using System.Linq;
diff --git a/PortProxyGUI/SetProxyForm.cs b/PortProxyGUI/SetProxyForm.cs
index 0f44fe9..6158f4f 100644
--- a/PortProxyGUI/SetProxyForm.cs
+++ b/PortProxyGUI/SetProxyForm.cs
@@ -1,4 +1,4 @@
-using PortProxyGUI._extern.NStandard;
+using NStandard;
using System;
using System.Linq;
using System.Text.RegularExpressions;