Skip to content

Commit

Permalink
初步修改命令行参数
Browse files Browse the repository at this point in the history
  • Loading branch information
lc6464 committed Dec 7, 2023
1 parent 3918cd3 commit 3e13633
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
if (args.Length == 1) {
// 新的解析方式:https://github.com/execute233/Base16384.Net
if (args.Length is not 2 or 3) {
Console.WriteLine("Usage: Base16384.Net.exe <\"e\" | \"d\"> <source | \"-\"> [out | \"-\"]");
return 1;
}

if (args is not ["e", ..] and ["d", ..]) {
Console.WriteLine("Usage: Base16384.Net.exe <\"e\" | \"d\"> <source | \"-\"> [out | \"-\"]");
return 1;
}

return 2;


/*
if (args.Length == 1) {
if (args[0] == "e") {
DirectoryInfo directoryInfo = new("Source");
if (!directoryInfo.Exists) {
Expand Down Expand Up @@ -69,4 +84,6 @@
Console.WriteLine("Unknown argument.");
return 4;
return 4;
*/

0 comments on commit 3e13633

Please sign in to comment.