Skip to content

Commit c208c65

Browse files
committed
Minor formatting
1 parent 7b39e5e commit c208c65

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

Source/LocalNetAppChat/LocalNetAppChat.ConsoleClient/Program.cs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ public static async Task Main(string[] args)
4646
"The text message to send to the server. (only when in message mode!)",
4747
"The name of your client. If not specified, your machine name will be sent as clientName to the server",
4848
"An Authentication password that the server requires to allow incoming requests from the client!",
49-
"Whether to ignore SSL Erros in console",
49+
"Whether to ignore SSL Errors in console",
5050
"Path where you want the requested File to be saved at after downloading it",
51-
"Prints out the commands and their corresponding descriptioon"
51+
"Prints out the commands and their corresponding description"
5252

5353
};
5454

@@ -63,7 +63,25 @@ public static async Task Main(string[] args)
6363
$"\n\n [Usage]\n\n" +
6464
$"\n{string.Join("\n", commandsWithDescription)}");
6565

66-
Console.WriteLine("\n\nExamples:\r\n\r\n – Start the client in listening mode\r\n $ LocalNetAppChat.ConsoleClient listener --server \"localhost\" --port 54214 --key 1234 --clientName \"GithubReadMe\"\r\n - Start the client in message mode\r\n $ LocalNetAppChat.ConsoleClient message --server \"localhost\" --port 51234 --key 1234 --text \"Hey there, I am client GithubReadMe\"\r\n - Start the client in chat mode\r\n LocalNetAppChat.ConsoleClient chat --server \"localhost\" --port 54214 --key 1234 --clientName \"GithubReadMe\"\r\n - Upload a file to the server\r\n $ LocalNetAppChat.ConsoleClient fileupload --server \"localhost\" --port 51234 --key 1234 --file \"./README.md\"\r\n - Download a file from the server\r\n $ LocalNetAppChat.ConsoleClient filedownload --server \"localhost\" --port 51234 --key 1234 --file \"./README.md\" --targetPath \"/home/github/Projects\"\r\n - Deletes a file from the server\r\n $ LocalNetAppChat.ConsoleClient filedelete --server \"localhost\" --port 51234 --key 1234 --file \"README.md\"\r\n - List all files existing on the server\r\n $ LocalNetAppChat.ConsoleClient listfiles --server \"localhost\" --port 51234 --key 1234");
66+
Console.WriteLine(@"
67+
68+
Examples:
69+
70+
– Start the client in listening mode
71+
$ LocalNetAppChat.ConsoleClient listener --server ""localhost"" --port 54214 --key 1234 --clientName ""GithubReadMe""
72+
- Start the client in message mode
73+
$ LocalNetAppChat.ConsoleClient message --server ""localhost"" --port 51234 --key 1234 --text ""Hey there, I am client GithubReadMe""
74+
- Start the client in chat mode
75+
LocalNetAppChat.ConsoleClient chat --server ""localhost"" --port 54214 --key 1234 --clientName ""GithubReadMe""
76+
- Upload a file to the server
77+
$ LocalNetAppChat.ConsoleClient fileupload --server ""localhost"" --port 51234 --key 1234 --file ""./README.md""
78+
- Download a file from the server
79+
$ LocalNetAppChat.ConsoleClient filedownload --server ""localhost"" --port 51234 --key 1234 --file ""./README.md"" --targetPath ""/home/github/Projects""
80+
- Deletes a file from the server
81+
$ LocalNetAppChat.ConsoleClient filedelete --server ""localhost"" --port 51234 --key 1234 --file ""README.md""
82+
- List all files existing on the server
83+
$ LocalNetAppChat.ConsoleClient listfiles --server ""localhost"" --port 51234 --key 1234
84+
");
6785

6886
return;
6987
}

Source/LocalNetAppChat/LocalNetAppChat.Domain/Clientside/ClientSideCommandLineParser.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public ICommandLineOption[] GetCommandsList()
1818
private Parser ParseArgs()
1919
{
2020
var parser = new Parser(
21-
new ICommandLineOption[] {
21+
new ICommandLineOption[]
22+
{
2223
new BoolCommandLineOption("message"),
2324
new BoolCommandLineOption("listener"),
2425
new BoolCommandLineOption("fileupload"),
@@ -37,9 +38,10 @@ private Parser ParseArgs()
3738
new BoolCommandLineOption("--ignoresslerrors"),
3839
new StringCommandLineOption("--targetPath"),
3940
new BoolCommandLineOption("--help")
40-
});
41+
});
4142
return parser;
4243
}
44+
4345
public Result<ClientSideCommandLineParameters> Parse(string[] args)
4446
{
4547
var parser = this.ParseArgs();

0 commit comments

Comments
 (0)