private static void Main(string[] args) { var client = new XmppBuilder() .BuildClient() .EnableLogging(new SerilogManager()) .Build(); client.Error += Client_Error; client.Connect("*****@*****.**", "8o0tcAmp"); Console.ReadLine(); }
private static void Main(string[] args) { Parser.Default.ParseArguments <Options>(args).WithParsed(o => { using (var client = XmppBuilder.BeginClientBuild() .EnableLogging(new SerilogManager()) .Build()) { client.Error += Client_Error; client.Connect(o.Jid, o.Password); Console.Write(">"); // Needed to keep app from exiting too early // Console apps don't have an inherent run loop Console.ReadLine(); } }); }