Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public bool OpenClose(long fileSize, FileOptions options)
[Arguments(OneKibibyte , FileOptions.None)]
[Arguments(OneKibibyte , FileOptions.Asynchronous)]
[AllowedOperatingSystems("Lock and Unlock are supported only on Windows and Linux", OS.Linux, OS.Windows)]
#if NET6_0_OR_GREATER // the method was marked as unsupported on macOS in .NET 6.0
[System.Runtime.Versioning.UnsupportedOSPlatform("macos")]
#endif
public void LockUnlock(long fileSize, FileOptions options)
{
string filePath = _sourceFilePaths[fileSize];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public override void WriteByte(byte value) { }
#if NETCOREAPP2_1_OR_GREATER // these virtual methods only exist in .NET Core 2.1+
public override void Write(ReadOnlySpan<byte> buffer) { }

public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default) => ValueTask.CompletedTask;
public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default) => new ValueTask(Task.CompletedTask);
#endif
}
}