C# Class slimCat.Utilities.Extensions.DispatcherExtensions

Afficher le fichier Open project: WreckedAvent/slimCat

Méthodes publiques

Méthode 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 méthode

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.
Résultat void