| @@ -1040,13 +1040,13 @@ namespace Discord | |||||
| #endregion | #endregion | ||||
| #region Async Wrapper | #region Async Wrapper | ||||
| /// <summary> Blocking call that will execute the provided async method and wait until client has been manually stopped. This is mainly intended for use in console applications. </summary> | |||||
| /// <summary> Blocking call that will execute the provided async method and wait until the client has been manually stopped. This is mainly intended for use in console applications. </summary> | |||||
| public void ExecuteAndWait(Func<Task> asyncAction) | public void ExecuteAndWait(Func<Task> asyncAction) | ||||
| { | { | ||||
| asyncAction().GetAwaiter().GetResult(); | asyncAction().GetAwaiter().GetResult(); | ||||
| _disconnectedEvent.WaitOne(); | _disconnectedEvent.WaitOne(); | ||||
| } | } | ||||
| /// <summary> Blocking call and wait until client has been manually stopped. This is mainly intended for use in console applications. </summary> | |||||
| /// <summary> Blocking call and wait until the client has been manually stopped. This is mainly intended for use in console applications. </summary> | |||||
| public void Wait() | public void Wait() | ||||
| { | { | ||||
| _disconnectedEvent.WaitOne(); | _disconnectedEvent.WaitOne(); | ||||