You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
750 B
C#
33 lines
750 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using backDot.TheDot;
|
|
|
|
|
|
namespace backDot;
|
|
|
|
public class Program{
|
|
public static async Task Main(string[] args){
|
|
string invalidMessage = "Invalid args!";
|
|
|
|
if (args.Length != 1){
|
|
Console.WriteLine(invalidMessage);
|
|
return;
|
|
}
|
|
|
|
string _arg = args[0];
|
|
|
|
if (_arg == "server" || _arg == "--s"){
|
|
AppServer _server = new AppServer();
|
|
await _server.RunServer();
|
|
}
|
|
else if (_arg == "client" || _arg == "--c"){
|
|
AppClient _client = new AppClient();
|
|
await _client.RunClient();
|
|
}
|
|
else{
|
|
Console.WriteLine(invalidMessage);
|
|
return;
|
|
}
|
|
}
|
|
}
|