Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Feb 20, 2024
1 parent 9891918 commit e63145a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
25 changes: 14 additions & 11 deletions src/Polyfill/Polyfill.targets
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,20 @@
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition="$(MemoryReferenced)">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net9'))">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net8'))">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net7'))">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net6'))">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net5'))">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition="'$(LowerFramework)'=='netcoreapp3.1'">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition="'$(LowerFramework)'=='netcoreapp3.0'">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition="'$(LowerFramework)'=='netcoreapp2.2'">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition="'$(LowerFramework)'=='netcoreapp2.1'">$(DefineConstants);HAS_SPAN</DefineConstants>
<DefineConstants Condition="'$(LowerFramework)'=='netcoreapp2.0'">$(DefineConstants)</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net4'))">$(DefineConstants)</DefineConstants>
<DefineConstants Condition="$(ValueTupleReferenced)">$(DefineConstants);HasValueTuple</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net9'))">$(DefineConstants);HAS_SPAN;HasValueTuple</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net8'))">$(DefineConstants);HAS_SPAN;HasValueTuple</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net7'))">$(DefineConstants);HAS_SPAN;HasValueTuple</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net6'))">$(DefineConstants);HAS_SPAN;HasValueTuple</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net5'))">$(DefineConstants);HAS_SPAN;HasValueTuple</DefineConstants>
<DefineConstants Condition="'$(LowerFramework)'=='netcoreapp3.1'">$(DefineConstants);HAS_SPAN;HasValueTuple</DefineConstants>
<DefineConstants Condition="'$(LowerFramework)'=='netcoreapp3.0'">$(DefineConstants);HAS_SPAN;HasValueTuple</DefineConstants>
<DefineConstants Condition="'$(LowerFramework)'=='netcoreapp2.2'">$(DefineConstants);HAS_SPAN;HasValueTuple</DefineConstants>
<DefineConstants Condition="'$(LowerFramework)'=='netcoreapp2.1'">$(DefineConstants);HAS_SPAN;HasValueTuple</DefineConstants>
<DefineConstants Condition="'$(LowerFramework)'=='netcoreapp2.0'">$(DefineConstants);HasValueTuple</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net47'))">$(DefineConstants);HasValueTuple</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('net48'))">$(DefineConstants);HasValueTuple</DefineConstants>
<DefineConstants Condition="$(LowerFramework.StartsWith('netstandard2'))">$(DefineConstants);HasValueTuple</DefineConstants>
</PropertyGroup>
</Target>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Polyfill/Polyfill_IEnumerable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ public static IEnumerable<TSource> Except<TSource>(
params TSource[] items) =>
target.Except((IEnumerable<TSource>)items, comparer);

#if !NET9_0_OR_GREATER
#if !NET9_0_OR_GREATER && HasValueTuple

/// <summary>
/// TODO
/// https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-9/overview#linq
/// </summary>
[Link("https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.index#system-linq-enumerable-index-1(system-collections-generic-ienumerable((-0)))")]
public static IEnumerable<(int Index, TSource Item)> Index<TSource> (this IEnumerable<TSource> source)
Expand Down

0 comments on commit e63145a

Please sign in to comment.