Skip to content

Commit

Permalink
Fixed preprocessor directives
Browse files Browse the repository at this point in the history
  • Loading branch information
Uralstech committed Nov 6, 2023
1 parent 1dad1ff commit df310e1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions LLama/Extensions/DictionaryExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ namespace LLama.Extensions
{
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)
{
return GetValueOrDefaultImpl(dictionary, key, defaultValue);
}
#elif !NET6_0_OR_GREATER
#elif !NET6_0_OR_GREATER && !NETSTANDARD2_1_OR_GREATER
#error Target framework not supported!
#endif

Expand Down
4 changes: 2 additions & 2 deletions LLama/Extensions/EncodingExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace LLama.Extensions;

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)
{
return GetCharsImpl(encoding, bytes, output);
Expand All @@ -15,7 +15,7 @@ public static int GetCharCount(this Encoding encoding, ReadOnlySpan<byte> bytes)
{
return GetCharCountImpl(encoding, bytes);
}
#elif !NET6_0_OR_GREATER
#elif !NET6_0_OR_GREATER && !NETSTANDARD2_1_OR_GREATER
#error Target framework not supported!
#endif

Expand Down
4 changes: 2 additions & 2 deletions LLama/Extensions/IEnumerableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ namespace LLama.Extensions
{
internal static class IEnumerableExtensions
{
#if NETSTANDARD2_0_OR_GREATER
#if NETSTANDARD2_0
public static IEnumerable<T> TakeLast<T>(this IEnumerable<T> source, int count)
{
return TakeLastImpl(source, count);
}
#elif !NET6_0_OR_GREATER
#elif !NET6_0_OR_GREATER && !NETSTANDARD2_1_OR_GREATER
#error Target framework not supported!
#endif

Expand Down
4 changes: 2 additions & 2 deletions LLama/Extensions/KeyValuePairExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// </summary>
internal static class KeyValuePairExtensions
{
#if NETSTANDARD2_0_OR_GREATER
#if NETSTANDARD2_0
/// <summary>
/// Deconstruct a KeyValuePair into it's constituent parts.
/// </summary>
Expand All @@ -19,7 +19,7 @@ public static void Deconstruct<TKey, TValue>(this System.Collections.Generic.Key
first = pair.Key;
second = pair.Value;
}
#elif !NET6_0_OR_GREATER
#elif !NET6_0_OR_GREATER && !NETSTANDARD2_1_OR_GREATER
#error Target framework not supported!
#endif
}
2 changes: 1 addition & 1 deletion LLama/Extensions/ListExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace LLama.Extensions
{
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)
{
if (list.Capacity < capacity)
Expand Down

0 comments on commit df310e1

Please sign in to comment.