/// <summary> /// Test if we can connect /// </summary> /// <param name="slackSocketClient"></param> private void TestConnection(SlackSocketClient slackSocketClient) { slackSocketClient.TestAuth((testme) => { Console.WriteLine("TestAuth"); if (testme.ok == false) { Console.WriteLine("Failed to connect"); } else { } }); }
private static void TestAuth() { ManualResetEventSlim authReady = new ManualResetEventSlim(false); SlackClient.TestAuth((authTestResponse) => { if (authTestResponse.ok) { authReady.Set(); } else { throw new MegaHALSlackClientAuthenticationException(); } }); authReady.Wait(); }