Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: T WaitSharingVio<T>(Func<T>, TimeSpan?, Action)

  • Declared in: RT.Util.Ut

Declaration

public static T WaitSharingVio<T>(
    Func<T> func,
    TimeSpan? maximum = null,
    Action onSharingVio = null
)

Summary

Executes the specified function. If the function results in a file sharing violation exception, the function will be repeatedly retried after a short delay (which increases after every failed attempt).

Generic type parameters

TThis type parameter is not documented.

Parameters

Func<T>func The function to be attempted and possibly retried.
TimeSpan?maximum Maximum amount of time to keep retrying for. When expired, any sharing violation exception will propagate to the caller of this method. Use null to retry indefinitely.
ActiononSharingVio Action to execute when a sharing violation does occur (is called before the waiting).