diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-04-19 17:19:32 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-04-19 17:19:32 -0400 |
| commit | c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 (patch) | |
| tree | ee4d51c7c1d633e11f46453ef1edd3c77c4ef9f7 /Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs | |
| download | Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.tar.gz Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.tar.bz2 Project-Sandbox-c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78.zip | |
Inital commit
Diffstat (limited to 'Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs')
| -rw-r--r-- | Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs new file mode 100644 index 0000000..4d4d3c9 --- /dev/null +++ b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic;
+
+namespace Packages.Rider.Editor.Util
+{
+ public class CommandLineParser
+ {
+ public Dictionary<string, string> Options = new Dictionary<string, string>();
+
+ public CommandLineParser(string[] args)
+ {
+ var i = 0;
+ while (i < args.Length)
+ {
+ var arg = args[i];
+ if (!arg.StartsWith("-"))
+ {
+ i++;
+ continue;
+ }
+
+ string value = null;
+ if (i + 1 < args.Length && !args[i + 1].StartsWith("-"))
+ {
+ value = args[i + 1];
+ i++;
+ }
+
+ if (!(Options.ContainsKey(arg)))
+ {
+ Options.Add(arg, value);
+ }
+ i++;
+ }
+ }
+ }
+}
\ No newline at end of file |
