diff --git a/contributing.md b/contributing.md index 81acdb08..54dead81 100644 --- a/contributing.md +++ b/contributing.md @@ -192,7 +192,7 @@ Example: #pragma warning disable -#if TASKSEXTENSIONSREFERENCED && MEMORYREFERENCED && (NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0) +#if MEMORYREFERENCED && (NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0) using System; using System.Buffers; @@ -204,6 +204,9 @@ using System.Threading.Tasks; static partial class Polyfill { + +#if TASKSEXTENSIONSREFERENCED + /// /// Asynchronously writes a character memory region to the stream. /// @@ -256,6 +259,8 @@ static partial class Polyfill return new(target.WriteLineAsync(segment.Array!, segment.Offset, segment.Count)); } +#endif + /// /// Writes a character span to the text stream. /// @@ -304,7 +309,7 @@ static partial class Polyfill } #endif ``` -snippet source | anchor +snippet source | anchor diff --git a/src/Polyfill/Polyfill_TextWriter.cs b/src/Polyfill/Polyfill_TextWriter.cs index 99227cdb..8ccd9d6d 100644 --- a/src/Polyfill/Polyfill_TextWriter.cs +++ b/src/Polyfill/Polyfill_TextWriter.cs @@ -2,7 +2,7 @@ #pragma warning disable -#if TASKSEXTENSIONSREFERENCED && MEMORYREFERENCED && (NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0) +#if MEMORYREFERENCED && (NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP2_0) using System; using System.Buffers; @@ -14,6 +14,9 @@ static partial class Polyfill { + +#if TASKSEXTENSIONSREFERENCED + /// /// Asynchronously writes a character memory region to the stream. /// @@ -66,6 +69,8 @@ public static ValueTask WriteLineAsync( return new(target.WriteLineAsync(segment.Array!, segment.Offset, segment.Count)); } +#endif + /// /// Writes a character span to the text stream. ///