Esempio n. 1
0
        private static async void WaitForInfoEvent(BotBitsClient botBits, TaskCompletionSource <bool> result,
                                                   CancellationToken token)
        {
            try
            {
                var e = await InfoEvent.Of(botBits).WaitOneAsync(token);

                result.SetException(new MapLoadException(e.Title, e.Text));
            }
            catch (TaskCanceledException)
            {
            }
        }
Esempio n. 2
0
        private async void WaitForInfoEvent()
        {
            var e = await InfoEvent.Of(BotBits).WaitOneAsync();

            connectResult.SetException(new MapLoadException(e.Title, e.Text));
        }