From 639530f578334b2659a3da4dcbb9ce3777cd3bb3 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 2 Nov 2021 01:34:21 +0100 Subject: [PATCH] Add missing compiler directives for framework specific helpers --- .../Enumerables/ReadOnlyRefEnumerable{T}.cs | 2 ++ .../Enumerables/RefEnumerable{T}.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CommunityToolkit.HighPerformance/Enumerables/ReadOnlyRefEnumerable{T}.cs b/CommunityToolkit.HighPerformance/Enumerables/ReadOnlyRefEnumerable{T}.cs index 462b2a5c..d36fbd10 100644 --- a/CommunityToolkit.HighPerformance/Enumerables/ReadOnlyRefEnumerable{T}.cs +++ b/CommunityToolkit.HighPerformance/Enumerables/ReadOnlyRefEnumerable{T}.cs @@ -441,6 +441,7 @@ public readonly ref readonly T Current } } +#if NETSTANDARD2_1_OR_GREATER /// /// Throws an when the "length" parameter is invalid. /// @@ -456,6 +457,7 @@ private static void ThrowArgumentOutOfRangeExceptionForStep() { throw new ArgumentOutOfRangeException("step"); } +#endif /// /// Throws an when the target span is too short. diff --git a/CommunityToolkit.HighPerformance/Enumerables/RefEnumerable{T}.cs b/CommunityToolkit.HighPerformance/Enumerables/RefEnumerable{T}.cs index 4d86c3ef..71755689 100644 --- a/CommunityToolkit.HighPerformance/Enumerables/RefEnumerable{T}.cs +++ b/CommunityToolkit.HighPerformance/Enumerables/RefEnumerable{T}.cs @@ -529,6 +529,7 @@ public readonly ref T Current } } +#if NETSTANDARD2_1_OR_GREATER /// /// Throws an when the "length" parameter is invalid. /// @@ -544,6 +545,7 @@ private static void ThrowArgumentOutOfRangeExceptionForStep() { throw new ArgumentOutOfRangeException("step"); } +#endif /// /// Throws an when the target span is too short.