Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadAtOffsetAsync()

static ValueTask< int > System.IO.RandomAccess.ReadAtOffsetAsync ( SafeFileHandle handle,
Memory< byte > buffer,
long fileOffset,
CancellationToken cancellationToken,
OSFileStreamStrategy strategy = null )
inlinestaticpackage

Definition at line 374 of file RandomAccess.cs.

375 {
376 if (handle.IsAsync)
377 {
379 if (overlappedValueTaskSource != null)
380 {
382 }
383 if (num == 0)
384 {
385 return ValueTask.FromResult(0);
386 }
387 return ValueTask.FromException<int>(Win32Marshal.GetExceptionForWin32Error(num, handle.Path));
388 }
390 }
static Memory< byte > buffer
static Memory< byte > long CancellationToken OSFileStreamStrategy strategy
static Memory< byte > long CancellationToken cancellationToken
static Memory< byte > long fileOffset
static ValueTask< int > ScheduleSyncReadAtOffsetAsync(SafeFileHandle handle, Memory< byte > buffer, long fileOffset, CancellationToken cancellationToken, OSFileStreamStrategy strategy)
static ValueTask FromException(Exception exception)
Definition ValueTask.cs:190

References System.IO.RandomAccess.buffer, System.IO.RandomAccess.cancellationToken, System.IO.RandomAccess.fileOffset, System.Threading.Tasks.ValueTask< TResult >.FromException(), System.IO.Win32Marshal.GetExceptionForWin32Error(), System.handle, System.IO.RandomAccess.ScheduleSyncReadAtOffsetAsync(), and System.IO.RandomAccess.strategy.

Referenced by System.IO.Strategies.OSFileStreamStrategy.ReadAsync(), System.IO.RandomAccess.ReadAsync(), and System.IO.RandomAccess.ReadScatterAtOffsetMultipleSyscallsAsync().