Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: void WaitSharingVio(Action, TimeSpan?, Action)

  • Declared in: RT.Util.Ut

Declaration

public static void WaitSharingVio(
    Action action,
    TimeSpan? maximum = null,
    Action onSharingVio = null
)

Summary

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

Parameters

Actionaction The action 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).