Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modern framework support #749

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions MoreLinq.Test/AggregateRightTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,17 @@ public void AggregateRightResultor()
}
}
}

namespace Linq
{
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void AggregateRightCanBuildWithSystemLinq()
{
new int[0].AggregateRight((l, r) => r);
}
}
}
19 changes: 19 additions & 0 deletions MoreLinq.Test/AggregateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ namespace MoreLinq.Test
using NUnit.Framework.Interfaces;
using static FuncModule;

using static MoreLinq.Extensions.AppendExtension;

[TestFixture]
public class AggregateTest
{
Expand Down Expand Up @@ -214,3 +216,20 @@ public void Issue616()
}
}
}

namespace Linq
{
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void AggregateCanBuildWithSystemLinq()
{
new int[0].Aggregate(
1, (l, r) => r,
1, (l, r) => r,
(l, r) => (l, r));
}
}
}
16 changes: 16 additions & 0 deletions MoreLinq.Test/AppendTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ namespace MoreLinq.Test
using System.Collections.Generic;
using NUnit.Framework;

using static MoreLinq.Extensions.AppendExtension;

[TestFixture]
public class AppendTest
{
Expand Down Expand Up @@ -90,3 +92,17 @@ public void AppendWithSharedSource()
}
}
}

namespace Linq
{
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void AppendCanBuildWithSystemLinq()
{
new int[0].Append(1);
}
}
}
14 changes: 14 additions & 0 deletions MoreLinq.Test/AtLeastTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,17 @@ public void AtLeastDoesNotIterateUnnecessaryElements()
}
}
}

namespace Linq
{
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void AtLeastCanBuildWithSystemLinq()
{
new int[0].AtLeast(1);
}
}
}
14 changes: 14 additions & 0 deletions MoreLinq.Test/AtMostTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,17 @@ public void AtMostDoesNotIterateUnnecessaryElements()
}
}
}

namespace Linq
{
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void AtMostCanBuildWithSystemLinq()
{
new int[0].AtMost(1);
}
}
}
14 changes: 14 additions & 0 deletions MoreLinq.Test/BacksertTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ public IEnumerable<int> Backsert(int[] seq1, int index, int[] seq2)
}
}
}

namespace Linq
{
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void BacksertCanBuildWithSystemLinq()
{
new int[0].Backsert(new int[0], 0);
}
}
}
14 changes: 14 additions & 0 deletions MoreLinq.Test/BatchTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,17 @@ public void BatchEmptySource(SourceKind kind)
}
}
}

namespace Linq
{
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void BatchCanBuildWithSystemLinq()
{
new int[0].Batch(2);
}
}
}
15 changes: 15 additions & 0 deletions MoreLinq.Test/CartesianTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,18 @@ public void TestEmptyCartesianEvaluation()
}
}
}

namespace Linq
{
using System;
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void CartesianCanBuildWithSystemLinq()
{
new int[0].Cartesian(new int[0], ValueTuple.Create);
}
}
}
14 changes: 14 additions & 0 deletions MoreLinq.Test/ChooseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,17 @@ public void ThoseEven()
}
}
}

namespace Linq
{
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void ChooseCanBuildWithSystemLinq()
{
new int[0].Choose(x => (true, x));
}
}
}
14 changes: 14 additions & 0 deletions MoreLinq.Test/ConsumeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,17 @@ public void ConsumeReallyConsumes()
}
}
}

namespace Linq
{
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void ConsumeCanBuildWithSystemLinq()
{
new int[0].Consume();
}
}
}
14 changes: 14 additions & 0 deletions MoreLinq.Test/CountBetweenTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,17 @@ public void CountBetweenDoesNotIterateUnnecessaryElements()
}
}
}

namespace Linq
{
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void CountBetweenCanBuildWithSystemLinq()
{
new int[0].CountBetween(1, 2);
}
}
}
15 changes: 15 additions & 0 deletions MoreLinq.Test/CountByTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,18 @@ public void CountByWithSomeNullKeys()
}
}
}

namespace Linq
{
using System;
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void CountByCanBuildWithSystemLinq()
{
new int[0].CountBy(x => 1);
}
}
}
15 changes: 15 additions & 0 deletions MoreLinq.Test/CountDownTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,18 @@ public ReadOnlyCollection(ICollection<T> collection,
}
}
}

namespace Linq
{
using System;
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void CountDownCanBuildWithSystemLinq()
{
new int[0].CountDown(5, ValueTuple.Create);
}
}
}
17 changes: 17 additions & 0 deletions MoreLinq.Test/DistinctByTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ namespace MoreLinq.Test
using System;
using NUnit.Framework;

using static MoreLinq.Extensions.DistinctByExtension;

[TestFixture]
public class DistinctByTest
{
Expand Down Expand Up @@ -61,3 +63,18 @@ public void DistinctByIsLazyWithComparer()
}
}
}

namespace Linq
{
using System;
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void DistinctByCanBuildWithSystemLinq()
{
new int[0].DistinctBy(x => 1);
}
}
}
15 changes: 15 additions & 0 deletions MoreLinq.Test/EndsWithTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,18 @@ public void EndsWithUsesCollectionsCountToAvoidUnnecessaryIteration(SourceKind s
}
}
}

namespace Linq
{
using System;
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void EndsWithCanBuildWithSystemLinq()
{
new int[0].EndsWith(new int[0]);
}
}
}
15 changes: 15 additions & 0 deletions MoreLinq.Test/EquiZipTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,18 @@ public void ZipDisposesInnerSequencesCaseGetEnumeratorThrows()
}
}
}

namespace Linq
{
using System;
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void EquiZipCanBuildWithSystemLinq()
{
new int[0].EquiZip(new int[0], ValueTuple.Create);
}
}
}
15 changes: 15 additions & 0 deletions MoreLinq.Test/EvaluateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,18 @@ public void TestEvaluateInvokesMethodsMultipleTimes()
}
}
}

namespace Linq
{
using System;
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void EvaluateCanBuildWithSystemLinq()
{
new Func<int>[0].Evaluate();
}
}
}
15 changes: 15 additions & 0 deletions MoreLinq.Test/ExactlyTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,18 @@ public void ExactlyDoesNotIterateUnnecessaryElements()
}
}
}

namespace Linq
{
using System;
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void ExactlyCanBuildWithSystemLinq()
{
new int[0].Exactly(3);
}
}
}
17 changes: 17 additions & 0 deletions MoreLinq.Test/ExceptByTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ namespace MoreLinq.Test
using System;
using NUnit.Framework;

using static MoreLinq.Extensions.ExceptByExtension;

[TestFixture]
public class ExceptByTest
{
Expand Down Expand Up @@ -74,3 +76,18 @@ public void ExceptByIsLazyWithComparer()
}
}
}

namespace Linq
{
using System;
using System.Linq;
using MoreLinq;

public static partial class BuildTest
{
public static void ExceptByCanBuildWithSystemLinq()
{
new int[0].ExceptBy(new int[0], x => 1);
}
}
}
Loading