From cfc65cc0aafc59b27ba2420fceded9196bc1c7f8 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Tue, 20 Feb 2024 20:01:32 +1100 Subject: [PATCH] cleanup --- contributing.md | 2 +- src/Polyfill/Polyfill.targets | 26 ++++++++++++-------------- src/Polyfill/Polyfill_Stream.cs | 2 +- src/Polyfill/Polyfill_TextReader.cs | 2 +- src/Polyfill/Polyfill_TextWriter.cs | 2 +- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/contributing.md b/contributing.md index 83ff1e2b..15ae70c9 100644 --- a/contributing.md +++ b/contributing.md @@ -205,7 +205,7 @@ using System.Threading.Tasks; static partial class Polyfill { -#if TASKSEXTENSIONSREFERENCED +#if FeatureValueTask /// /// Asynchronously writes a character memory region to the stream. diff --git a/src/Polyfill/Polyfill.targets b/src/Polyfill/Polyfill.targets index 068a937b..106a8cb1 100644 --- a/src/Polyfill/Polyfill.targets +++ b/src/Polyfill/Polyfill.targets @@ -1,7 +1,6 @@ $(PrepareForBuildDependsOn);PreparePolyfill - false $(TargetFramework.ToLower()) @@ -36,27 +35,26 @@ $(DefineConstants);FeatureMemory - true $(DefineConstants);TASKSEXTENSIONSREFERENCED + Condition="@(PackageDependencies->WithMetadataValue('Identity', 'System.Threading.Tasks.Extensions')->Count()) != 0">$(DefineConstants);FeatureValueTask $(DefineConstants);FetureHttp - $(DefineConstants);FeatureMemory;FeatureValueTuple - $(DefineConstants);FeatureMemory;FeatureValueTuple - $(DefineConstants);FeatureMemory;FeatureValueTuple - $(DefineConstants);FeatureMemory;FeatureValueTuple - $(DefineConstants);FeatureMemory;FeatureValueTuple - $(DefineConstants);FeatureMemory;FeatureValueTuple - $(DefineConstants);FeatureMemory;FeatureValueTuple - $(DefineConstants);FeatureMemory;FeatureValueTuple - $(DefineConstants);FeatureMemory;FeatureValueTuple + $(DefineConstants);FeatureMemory;FeatureValueTuple;FeatureValueTask + $(DefineConstants);FeatureMemory;FeatureValueTuple;FeatureValueTask + $(DefineConstants);FeatureMemory;FeatureValueTuple;FeatureValueTask + $(DefineConstants);FeatureMemory;FeatureValueTuple;FeatureValueTask + $(DefineConstants);FeatureMemory;FeatureValueTuple;FeatureValueTask + $(DefineConstants);FeatureMemory;FeatureValueTuple;FeatureValueTask + $(DefineConstants);FeatureMemory;FeatureValueTuple;FeatureValueTask + $(DefineConstants);FeatureMemory;FeatureValueTuple;FeatureValueTask + $(DefineConstants);FeatureMemory;FeatureValueTuple;FeatureValueTask $(DefineConstants);FeatureValueTuple $(DefineConstants);FeatureValueTuple $(DefineConstants);FeatureValueTuple - $(DefineConstants);FeatureValueTuple + $(DefineConstants);FeatureValueTuple;FeatureValueTask + $(DefineConstants);FeatureValueTuple diff --git a/src/Polyfill/Polyfill_Stream.cs b/src/Polyfill/Polyfill_Stream.cs index b54a46eb..fdc8009e 100644 --- a/src/Polyfill/Polyfill_Stream.cs +++ b/src/Polyfill/Polyfill_Stream.cs @@ -2,7 +2,7 @@ #pragma warning disable -#if TASKSEXTENSIONSREFERENCED && (NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0) +#if FeatureValueTask && (NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0) using System; using System.IO; diff --git a/src/Polyfill/Polyfill_TextReader.cs b/src/Polyfill/Polyfill_TextReader.cs index 795b83d4..636c6591 100644 --- a/src/Polyfill/Polyfill_TextReader.cs +++ b/src/Polyfill/Polyfill_TextReader.cs @@ -11,7 +11,7 @@ static partial class Polyfill { -#if TASKSEXTENSIONSREFERENCED && FeatureMemory && (NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0) +#if FeatureValueTask && FeatureMemory && (NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0) /// /// Asynchronously reads the characters from the current stream into a memory block. /// diff --git a/src/Polyfill/Polyfill_TextWriter.cs b/src/Polyfill/Polyfill_TextWriter.cs index 4bca1a31..feb43828 100644 --- a/src/Polyfill/Polyfill_TextWriter.cs +++ b/src/Polyfill/Polyfill_TextWriter.cs @@ -15,7 +15,7 @@ static partial class Polyfill { -#if TASKSEXTENSIONSREFERENCED +#if FeatureValueTask /// /// Asynchronously writes a character memory region to the stream.