public static ClearPool ( |
||
connection | ||
return | void |
public Task ClearPoolAsync(MySqlConnection connection) { return(Task.Factory.StartNew(delegate { MySqlConnection.ClearPool(connection); })); }
public Task ClearPoolAsync(MySqlConnection connection, CancellationToken cancellationToken) { TaskCompletionSource <bool> taskCompletionSource = new TaskCompletionSource <bool>(); if (cancellationToken == CancellationToken.None || !cancellationToken.IsCancellationRequested) { try { MySqlConnection.ClearPool(connection); taskCompletionSource.SetResult(true); goto IL_3C; } catch (Exception exception) { taskCompletionSource.SetException(exception); goto IL_3C; } } taskCompletionSource.SetCanceled(); IL_3C: return(taskCompletionSource.Task); }