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:
parent
5ed2f4ca31
commit
002d53f003
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user