public static Task <IDisposable> TryLockAsync(this IDirectoryAccessor directoryAccessor) { if (directoryAccessor == null) { throw new ArgumentNullException(nameof(directoryAccessor)); } return(FileLock.TryCreateAsync(directoryAccessor)); }
public Task <IDisposable> TryLockAsync() { return(FileLock.TryCreateAsync(this)); }