Reduced main method
This commit is contained in:
parent
18872ad5bc
commit
b98154ffcc
@ -8,20 +8,7 @@ public class OSCCollar
|
|||||||
|
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
OSCCollar collar;
|
OSCCollar collar = new OSCCollar();
|
||||||
if (args.Length == 3)
|
|
||||||
{
|
|
||||||
string ip = args[0];
|
|
||||||
if(!IPAddress.TryParse(args[0], out IPAddress? _) ||
|
|
||||||
!int.TryParse(args[1], out var portReceive) ||
|
|
||||||
!int.TryParse(args[2], out var portSend))
|
|
||||||
{
|
|
||||||
Console.WriteLine("Invalid parameter.\n\rParameters <ip> <receivePort> <sendPort>");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
collar = new OSCCollar(ip, portReceive, portSend);
|
|
||||||
}else
|
|
||||||
collar = new OSCCollar();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private OscServer Server { get; init; }
|
private OscServer Server { get; init; }
|
||||||
|
Loading…
Reference in New Issue
Block a user