Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit ab1c9dc

Browse files
committed
Add Bcl.Async/ValueTask to NETStd
1 parent cd27eed commit ab1c9dc

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/ServiceStack.Text/Env.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,15 @@ public static ConfiguredTaskAwaitable ConfigAwait(this Task task) =>
311311
public static ConfiguredTaskAwaitable<T> ConfigAwait<T>(this Task<T> task) =>
312312
task.ConfigureAwait(ContinueOnCapturedContext);
313313

314+
#if NETSTANDARD || NETCORE2_1
314315
[MethodImpl(MethodImplOptions.AggressiveInlining)]
315316
public static ConfiguredValueTaskAwaitable ConfigAwait(this ValueTask task) =>
316317
task.ConfigureAwait(ContinueOnCapturedContext);
317318

318319
[MethodImpl(MethodImplOptions.AggressiveInlining)]
319320
public static ConfiguredValueTaskAwaitable<T> ConfigAwait<T>(this ValueTask<T> task) =>
320321
task.ConfigureAwait(ContinueOnCapturedContext);
322+
#endif
323+
321324
}
322325
}

src/ServiceStack.Text/ServiceStack.Text.Core.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
</ItemGroup>
2222
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
2323
<PackageReference Include="System.Runtime" Version="4.3.1" />
24+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" />
2425
</ItemGroup>
2526
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
2627
<PackageReference Include="System.Runtime" Version="4.3.1" />

src/ServiceStack.Text/ServiceStack.Text.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
</ItemGroup>
2424
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
2525
<PackageReference Include="System.Runtime" Version="4.3.1" />
26+
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.0" />
2627
</ItemGroup>
2728
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
2829
<PackageReference Include="System.Runtime" Version="4.3.1" />

0 commit comments

Comments
 (0)