| @@ -4,12 +4,12 @@ namespace LLama.Extensions | |||||
| { | { | ||||
| internal static class DictionaryExtensions | internal static class DictionaryExtensions | ||||
| { | { | ||||
| #if NETSTANDARD2_0_OR_GREATER | |||||
| #if NETSTANDARD2_0 | |||||
| public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue) | public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue) | ||||
| { | { | ||||
| return GetValueOrDefaultImpl(dictionary, key, defaultValue); | return GetValueOrDefaultImpl(dictionary, key, defaultValue); | ||||
| } | } | ||||
| #elif !NET6_0_OR_GREATER | |||||
| #elif !NET6_0_OR_GREATER && !NETSTANDARD2_1_OR_GREATER | |||||
| #error Target framework not supported! | #error Target framework not supported! | ||||
| #endif | #endif | ||||
| @@ -5,7 +5,7 @@ namespace LLama.Extensions; | |||||
| internal static class EncodingExtensions | internal static class EncodingExtensions | ||||
| { | { | ||||
| #if NETSTANDARD2_0_OR_GREATER | |||||
| #if NETSTANDARD2_0 | |||||
| public static int GetChars(this Encoding encoding, ReadOnlySpan<byte> bytes, Span<char> output) | public static int GetChars(this Encoding encoding, ReadOnlySpan<byte> bytes, Span<char> output) | ||||
| { | { | ||||
| return GetCharsImpl(encoding, bytes, output); | return GetCharsImpl(encoding, bytes, output); | ||||
| @@ -15,7 +15,7 @@ internal static class EncodingExtensions | |||||
| { | { | ||||
| return GetCharCountImpl(encoding, bytes); | return GetCharCountImpl(encoding, bytes); | ||||
| } | } | ||||
| #elif !NET6_0_OR_GREATER | |||||
| #elif !NET6_0_OR_GREATER && !NETSTANDARD2_1_OR_GREATER | |||||
| #error Target framework not supported! | #error Target framework not supported! | ||||
| #endif | #endif | ||||
| @@ -5,12 +5,12 @@ namespace LLama.Extensions | |||||
| { | { | ||||
| internal static class IEnumerableExtensions | internal static class IEnumerableExtensions | ||||
| { | { | ||||
| #if NETSTANDARD2_0_OR_GREATER | |||||
| #if NETSTANDARD2_0 | |||||
| public static IEnumerable<T> TakeLast<T>(this IEnumerable<T> source, int count) | public static IEnumerable<T> TakeLast<T>(this IEnumerable<T> source, int count) | ||||
| { | { | ||||
| return TakeLastImpl(source, count); | return TakeLastImpl(source, count); | ||||
| } | } | ||||
| #elif !NET6_0_OR_GREATER | |||||
| #elif !NET6_0_OR_GREATER && !NETSTANDARD2_1_OR_GREATER | |||||
| #error Target framework not supported! | #error Target framework not supported! | ||||
| #endif | #endif | ||||
| @@ -5,7 +5,7 @@ | |||||
| /// </summary> | /// </summary> | ||||
| internal static class KeyValuePairExtensions | internal static class KeyValuePairExtensions | ||||
| { | { | ||||
| #if NETSTANDARD2_0_OR_GREATER | |||||
| #if NETSTANDARD2_0 | |||||
| /// <summary> | /// <summary> | ||||
| /// Deconstruct a KeyValuePair into it's constituent parts. | /// Deconstruct a KeyValuePair into it's constituent parts. | ||||
| /// </summary> | /// </summary> | ||||
| @@ -19,7 +19,7 @@ internal static class KeyValuePairExtensions | |||||
| first = pair.Key; | first = pair.Key; | ||||
| second = pair.Value; | second = pair.Value; | ||||
| } | } | ||||
| #elif !NET6_0_OR_GREATER | |||||
| #elif !NET6_0_OR_GREATER && !NETSTANDARD2_1_OR_GREATER | |||||
| #error Target framework not supported! | #error Target framework not supported! | ||||
| #endif | #endif | ||||
| } | } | ||||
| @@ -5,7 +5,7 @@ namespace LLama.Extensions | |||||
| { | { | ||||
| internal static class ListExtensions | internal static class ListExtensions | ||||
| { | { | ||||
| #if NETSTANDARD2_0_OR_GREATER | |||||
| #if NETSTANDARD2_0 || NETSTANDARD2_1 | |||||
| public static void EnsureCapacity<T>(this List<T> list, int capacity) | public static void EnsureCapacity<T>(this List<T> list, int capacity) | ||||
| { | { | ||||
| if (list.Capacity < capacity) | if (list.Capacity < capacity) | ||||