C# Class slimCat.Utilities.Extensions.DispatcherExtensions

Exibir arquivo Open project: WreckedAvent/slimCat

Public Methods

Method Description
InvokeWithRetry ( this dispatcher, System.Action toInvoke, int maxRetries = 3, int currentRetries ) : void

Invokes a Dispatcher.Invoke(Action) with a retry mechanism, suitable for potentially long-running tasks that might fail or be cancelled. If the number of retries is exceeded, the Exception that caused the failure will be rethrown.

Method Details

InvokeWithRetry() public static method

Invokes a Dispatcher.Invoke(Action) with a retry mechanism, suitable for potentially long-running tasks that might fail or be cancelled. If the number of retries is exceeded, the Exception that caused the failure will be rethrown.
public static InvokeWithRetry ( this dispatcher, System.Action toInvoke, int maxRetries = 3, int currentRetries ) : void
dispatcher this The dispatcher.
toInvoke System.Action The action to invoke.
maxRetries int The maximum number of retries.
currentRetries int The current number of retries.
return void