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

◆ PrepareForEndFunction()

static XOverlappedAsyncResult Microsoft.Xna.Framework.XOverlappedAsyncResult.PrepareForEndFunction ( IAsyncResult result)
inlinestaticpackage

Definition at line 68 of file XOverlappedAsyncResult.cs.

69 {
70 if (result == null)
71 {
72 throw new ArgumentNullException("result");
73 }
74 if (!(result is XOverlappedAsyncResult xOverlappedAsyncResult))
75 {
76 throw new ArgumentException(FrameworkResources.IAsyncNotFromBegin);
77 }
78 if (xOverlappedAsyncResult.endHasBeenCalled)
79 {
80 throw new InvalidOperationException(FrameworkResources.CannotEndTwice);
81 }
82 xOverlappedAsyncResult.endHasBeenCalled = true;
83 xOverlappedAsyncResult.AsyncWaitHandle.WaitOne();
84 GC.SuppressFinalize(xOverlappedAsyncResult);
85 return xOverlappedAsyncResult;
86 }
XOverlappedAsyncResult(object asyncState, uint kernelHandle, bool isReusable, AsyncOperationCleanup kernelHandleCleanup)
static void SuppressFinalize(object obj)
Definition GC.cs:202
Definition GC.cs:8

References Microsoft.Xna.Framework.FrameworkResources.CannotEndTwice, Microsoft.Xna.Framework.FrameworkResources.IAsyncNotFromBegin, and System.GC.SuppressFinalize().