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

◆ RegisterForCancellation()

unsafe void Microsoft.Win32.SafeHandles.SafeFileHandle.OverlappedValueTaskSource.RegisterForCancellation ( CancellationToken cancellationToken)
inlinepackage

Definition at line 299 of file SafeFileHandle.cs.

300 {
301 if (!cancellationToken.CanBeCanceled)
302 {
303 return;
304 }
305 try
306 {
308 {
310 if (!overlappedValueTaskSource._fileHandle.IsInvalid)
311 {
312 try
313 {
315 }
317 {
318 }
319 }
320 }, this);
321 }
323 {
324 }
325 }
static unsafe bool CancelIoEx(SafeHandle handle, NativeOverlapped *lpOverlapped)

References Microsoft.Win32.SafeHandles.SafeFileHandle.OverlappedValueTaskSource.OverlappedValueTaskSource(), Microsoft.Win32.SafeHandles.SafeFileHandle.OverlappedValueTaskSource._cancellationRegistration, Interop.Kernel32.CancelIoEx(), System.cancellationToken, and System.s.