Example #1
0
 /// <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
         {
         }
     });
 }
Example #2
0
        private static void TestAuth()
        {
            ManualResetEventSlim authReady = new ManualResetEventSlim(false);

            SlackClient.TestAuth((authTestResponse) =>
            {
                if (authTestResponse.ok)
                {
                    authReady.Set();
                }
                else
                {
                    throw new MegaHALSlackClientAuthenticationException();
                }
            });
            authReady.Wait();
        }