1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-14 04:05:41 +00:00

Call ConfigureAwait for awaited methods

This commit is contained in:
Oliver Booth 2022-11-29 18:37:42 +00:00
parent 5ed2f4ca31
commit 002d53f003
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
using VpSharp.Internal; using VpSharp.Internal;
using VpSharp.Internal.NativeAttributes; using VpSharp.Internal.NativeAttributes;
using static VpSharp.Internal.Native; using static VpSharp.Internal.Native;
@ -49,7 +49,7 @@ public class VirtualParadiseModelObject : VirtualParadiseObject
ArgumentNullException.ThrowIfNull(action); ArgumentNullException.ThrowIfNull(action);
var builder = new VirtualParadiseModelObjectBuilder(Client, ObjectBuilderMode.Modify); var builder = new VirtualParadiseModelObjectBuilder(Client, ObjectBuilderMode.Modify);
await Task.Run(() => action(builder)); await Task.Run(() => action(builder)).ConfigureAwait(true);
lock (Client.Lock) lock (Client.Lock)
{ {

View File

@ -1,4 +1,4 @@
using System.Numerics; using System.Numerics;
using VpSharp.Exceptions; using VpSharp.Exceptions;
using VpSharp.Extensions; using VpSharp.Extensions;
using VpSharp.Internal; using VpSharp.Internal;
@ -98,16 +98,16 @@ public abstract class VirtualParadiseObject : IEquatable<VirtualParadiseObject>
switch (phase) switch (phase)
{ {
case BumpPhase.Begin: case BumpPhase.Begin:
await SendBegin(); await SendBegin().ConfigureAwait(true);
break; break;
case BumpPhase.End: case BumpPhase.End:
await SendEnd(); await SendEnd().ConfigureAwait(true);
break; break;
case null: case null:
await SendBegin(); await SendBegin().ConfigureAwait(true);
await SendEnd(); await SendEnd().ConfigureAwait(true);
break; break;
} }
} }