Пример #1
0
        private void DoReconnectAttempt()
        {
            ReconnectAttempt?.Invoke(this, EventArgs.Empty);

            MainChannel.AddMessage(new ChatMessage(null, Color.White, DateTime.Now, "Attempting to reconnect to CnCNet..."));

            connection.ConnectAsync();
        }
Пример #2
0
 /// <summary>
 ///     Triggers the <see cref="ReconnectAttempt"/> event asynchronously.
 /// </summary>
 /// <param name="eventArgs">the event arguments</param>
 /// <returns>a task that represents the asynchronously operation.</returns>
 protected virtual Task OnReconnectAttemptAsync(ReconnectAttemptEventArgs eventArgs)
 => ReconnectAttempt.InvokeAsync(this, eventArgs);