From 836f5910c00fb10181c04b2b27123f8ca896f8a5 Mon Sep 17 00:00:00 2001 From: Atif Aziz Date: Tue, 27 Feb 2018 22:18:54 +0100 Subject: [PATCH] Whitespace consistency in sources :art: - Applies `insert_final_newline=true` from EditorConfig - Applies `trim_trailing_whitespace=true` from EditorConfig - Adds `eclint` to CI builds to ensure continued consistency --- .travis.yml | 7 ++ MoreLinq.Test/AcquireTest.cs | 8 +- MoreLinq.Test/AggregateRightTest.cs | 6 +- MoreLinq.Test/AssertCountTest.cs | 6 +- MoreLinq.Test/AssertTest.cs | 6 +- MoreLinq.Test/AtLeastTest.cs | 6 +- MoreLinq.Test/AtMostTest.cs | 6 +- MoreLinq.Test/BatchTest.cs | 6 +- MoreLinq.Test/BreakingCollection.cs | 6 +- MoreLinq.Test/BreakingSequence.cs | 6 +- MoreLinq.Test/CartesianTest.cs | 4 +- MoreLinq.Test/Combinatorics.cs | 2 +- MoreLinq.Test/CompareCountTest.cs | 6 +- MoreLinq.Test/Comparer.cs | 2 +- MoreLinq.Test/ConcatTest.cs | 10 +- MoreLinq.Test/ConsumeTest.cs | 6 +- MoreLinq.Test/CountBetweenTest.cs | 6 +- MoreLinq.Test/CountByTest.cs | 12 +- MoreLinq.Test/CurrentThreadCultureScope.cs | 10 +- MoreLinq.Test/DistinctByTest.cs | 6 +- MoreLinq.Test/EndsWithTest.cs | 6 +- MoreLinq.Test/EqualityComparer.cs | 2 +- MoreLinq.Test/EquiZipTest.cs | 6 +- MoreLinq.Test/EvaluateTest.cs | 6 +- MoreLinq.Test/ExactlyTest.cs | 6 +- MoreLinq.Test/ExceptByTest.cs | 6 +- MoreLinq.Test/ExcludeTest.cs | 2 +- MoreLinq.Test/FallbackIfEmptyTest.cs | 6 +- MoreLinq.Test/FillBackwardTest.cs | 2 +- MoreLinq.Test/FillForwardTest.cs | 2 +- MoreLinq.Test/FlattenTest.cs | 6 +- MoreLinq.Test/FoldTest.cs | 8 +- MoreLinq.Test/ForEachTest.cs | 6 +- MoreLinq.Test/FromTest.cs | 6 +- MoreLinq.Test/FullGroupJoinTest.cs | 7 +- MoreLinq.Test/FullJoinTest.cs | 7 +- MoreLinq.Test/GenerateTest.cs | 6 +- MoreLinq.Test/GroupAdjacentTest.cs | 42 +++---- MoreLinq.Test/IndexTest.cs | 6 +- MoreLinq.Test/InsertTest.cs | 6 +- MoreLinq.Test/InterleaveTest.cs | 4 +- MoreLinq.Test/KeyValuePair.cs | 6 +- MoreLinq.Test/LagTest.cs | 2 +- MoreLinq.Test/LeadTest.cs | 4 +- MoreLinq.Test/LeftJoinTest.cs | 7 +- MoreLinq.Test/MaxByTest.cs | 6 +- MoreLinq.Test/MinByTest.cs | 6 +- MoreLinq.Test/MoreLinq.Test.csproj | 2 +- MoreLinq.Test/MoveTest.cs | 10 +- MoreLinq.Test/NullArgumentTest.cs | 6 +- MoreLinq.Test/OrderByTest.cs | 2 +- MoreLinq.Test/PadStartTest.cs | 6 +- MoreLinq.Test/PadTest.cs | 6 +- MoreLinq.Test/PairwiseTest.cs | 6 +- MoreLinq.Test/PartialSortByTest.cs | 8 +- MoreLinq.Test/PartialSortTest.cs | 8 +- MoreLinq.Test/PermutationsTest.cs | 2 +- MoreLinq.Test/PipeTest.cs | 6 +- MoreLinq.Test/PreScanTest.cs | 6 +- MoreLinq.Test/PrependTest.cs | 6 +- MoreLinq.Test/RandomSubsetTest.cs | 6 +- MoreLinq.Test/RandomTest.cs | 2 +- MoreLinq.Test/RankTest.cs | 2 +- MoreLinq.Test/RepeatTest.cs | 2 +- MoreLinq.Test/RightJoinTest.cs | 7 +- MoreLinq.Test/RunLengthEncodeTest.cs | 4 +- MoreLinq.Test/SampleData.cs | 6 +- MoreLinq.Test/ScanRightTest.cs | 10 +- MoreLinq.Test/ScanTest.cs | 6 +- MoreLinq.Test/Scope.cs | 8 +- MoreLinq.Test/SegmentTest.cs | 2 +- MoreLinq.Test/SequenceReader.cs | 2 +- MoreLinq.Test/SequenceTest.cs | 6 +- MoreLinq.Test/SingleOrFallbackTest.cs | 6 +- MoreLinq.Test/SkipLastTest.cs | 6 +- MoreLinq.Test/SkipUntilTest.cs | 6 +- MoreLinq.Test/SortedMergeTest.cs | 4 +- MoreLinq.Test/StartsWithTest.cs | 2 +- MoreLinq.Test/SubsetTest.cs | 2 +- MoreLinq.Test/TagFirstLastTest.cs | 6 +- MoreLinq.Test/TakeEveryTest.cs | 8 +- MoreLinq.Test/TakeLastTest.cs | 8 +- MoreLinq.Test/TakeUntilTest.cs | 6 +- MoreLinq.Test/ToArrayByIndexTest.cs | 6 +- MoreLinq.Test/ToDataTableTest.cs | 6 +- MoreLinq.Test/ToDelimitedStringTest.cs | 6 +- MoreLinq.Test/TraverseTest.cs | 6 +- MoreLinq.Test/UnenumerableReadOnlyList.cs | 2 +- MoreLinq.Test/UnfoldTest.cs | 6 +- MoreLinq.Test/VerifiableEnumerator.cs | 2 +- MoreLinq.Test/WindowedTest.cs | 2 +- MoreLinq.Test/ZipLongestTest.cs | 6 +- MoreLinq.Test/ZipShortestTest.cs | 6 +- MoreLinq.shfbproj | 2 +- MoreLinq/Acquire.cs | 16 +-- MoreLinq/AggregateRight.cs | 14 +-- MoreLinq/AssemblyInfo.cs | 8 +- MoreLinq/Assert.cs | 16 +-- MoreLinq/AssertCount.cs | 14 +-- MoreLinq/Batch.cs | 12 +- MoreLinq/Cartesian.cs | 12 +- MoreLinq/Concat.cs | 12 +- MoreLinq/Consume.cs | 8 +- MoreLinq/CountBy.cs | 10 +- MoreLinq/CountMethods.cs | 12 +- MoreLinq/DistinctBy.cs | 8 +- MoreLinq/EquiZip.cs | 10 +- MoreLinq/Evaluate.cs | 6 +- MoreLinq/ExceptBy.cs | 10 +- MoreLinq/Exclude.cs | 10 +- MoreLinq/FillBackward.cs | 6 +- MoreLinq/FillForward.cs | 6 +- MoreLinq/Flatten.cs | 6 +- MoreLinq/Fold.cs | 6 +- MoreLinq/ForEach.cs | 6 +- MoreLinq/From.cs | 6 +- MoreLinq/FullGroupJoin.cs | 6 +- MoreLinq/FullJoin.cs | 6 +- MoreLinq/GenerateByIndex.cs | 6 +- MoreLinq/GroupAdjacent.cs | 134 ++++++++++----------- MoreLinq/Index.cs | 20 +-- MoreLinq/Insert.cs | 6 +- MoreLinq/Interleave.cs | 10 +- MoreLinq/Lag.cs | 10 +- MoreLinq/Lead.cs | 12 +- MoreLinq/LeftJoin.cs | 6 +- MoreLinq/MaxBy.cs | 12 +- MoreLinq/MinBy.cs | 10 +- MoreLinq/MoreEnumerable.cs | 10 +- MoreLinq/MoreLinq.csproj | 2 +- MoreLinq/Move.cs | 6 +- MoreLinq/NestedLoops.cs | 10 +- MoreLinq/OrderBy.cs | 16 +-- MoreLinq/OrderByDirection.cs | 10 +- MoreLinq/OrderedMerge.cs | 2 +- MoreLinq/Pad.cs | 20 +-- MoreLinq/PadStart.cs | 14 +-- MoreLinq/Pairwise.cs | 18 +-- MoreLinq/PcNode.cs | 8 +- MoreLinq/Permutations.cs | 20 +-- MoreLinq/Pipe.cs | 6 +- MoreLinq/PreScan.cs | 6 +- MoreLinq/Prepend.cs | 10 +- MoreLinq/Random.cs | 28 ++--- MoreLinq/RandomSubset.cs | 12 +- MoreLinq/Rank.cs | 16 +-- MoreLinq/Repeat.cs | 8 +- MoreLinq/RightJoin.cs | 6 +- MoreLinq/RunLengthEncode.cs | 14 +-- MoreLinq/Scan.cs | 14 +-- MoreLinq/ScanRight.cs | 10 +- MoreLinq/Segment.cs | 14 +-- MoreLinq/Sequence.cs | 8 +- MoreLinq/SequenceException.cs | 12 +- MoreLinq/SingleOrFallback.cs | 6 +- MoreLinq/SkipUntil.cs | 6 +- MoreLinq/Slice.cs | 6 +- MoreLinq/SortedMerge.cs | 16 +-- MoreLinq/StartsWith.cs | 6 +- MoreLinq/Subsets.cs | 20 +-- MoreLinq/TagFirstLast.cs | 26 ++-- MoreLinq/TakeLast.cs | 16 +-- MoreLinq/TakeUntil.cs | 6 +- MoreLinq/ToArrayByIndex.cs | 6 +- MoreLinq/ToDataTable.cs | 6 +- MoreLinq/Trace.cs | 14 +-- MoreLinq/Traverse.cs | 6 +- MoreLinq/Unfold.cs | 8 +- MoreLinq/Windowed.cs | 12 +- MoreLinq/Zip.stub.cs | 4 +- MoreLinq/ZipShortest.cs | 34 +++--- README.md | 12 +- appveyor.yml | 8 +- msbuild.sh | 2 +- test.sh | 4 +- 175 files changed, 766 insertions(+), 757 deletions(-) diff --git a/.travis.yml b/.travis.yml index bfbfdfdb4..9411a24eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,13 @@ before_install: install: - dotnet restore + - npm install -g eclint + +before_script: + - git rm .editorconfig + - eclint check -n "**/*.{cs,tt,cmd,sh,md,txt,yml}" + - eclint check -w "**/*.{cs,tt,cmd,sh,md,txt,yml,json,sln,csproj,shfbproj}" + - git reset --hard script: - | diff --git a/MoreLinq.Test/AcquireTest.cs b/MoreLinq.Test/AcquireTest.cs index d1ef46e56..18056faab 100644 --- a/MoreLinq.Test/AcquireTest.cs +++ b/MoreLinq.Test/AcquireTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -82,4 +82,4 @@ class Disposable : IDisposable class ApplicationException : Exception {} } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/AggregateRightTest.cs b/MoreLinq.Test/AggregateRightTest.cs index ae89431b0..687788a7f 100644 --- a/MoreLinq.Test/AggregateRightTest.cs +++ b/MoreLinq.Test/AggregateRightTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/AssertCountTest.cs b/MoreLinq.Test/AssertCountTest.cs index a2608965c..df742c12e 100644 --- a/MoreLinq.Test/AssertCountTest.cs +++ b/MoreLinq.Test/AssertCountTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/AssertTest.cs b/MoreLinq.Test/AssertTest.cs index 54e8c72bf..ab21215f0 100644 --- a/MoreLinq.Test/AssertTest.cs +++ b/MoreLinq.Test/AssertTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/AtLeastTest.cs b/MoreLinq.Test/AtLeastTest.cs index 8ef6e90d7..97f38f639 100644 --- a/MoreLinq.Test/AtLeastTest.cs +++ b/MoreLinq.Test/AtLeastTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/AtMostTest.cs b/MoreLinq.Test/AtMostTest.cs index afc8a729e..35ff080c4 100644 --- a/MoreLinq.Test/AtMostTest.cs +++ b/MoreLinq.Test/AtMostTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/BatchTest.cs b/MoreLinq.Test/BatchTest.cs index 770a07660..f3aa6ec4e 100644 --- a/MoreLinq.Test/BatchTest.cs +++ b/MoreLinq.Test/BatchTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/BreakingCollection.cs b/MoreLinq.Test/BreakingCollection.cs index 61bab3e8c..db69d0101 100644 --- a/MoreLinq.Test/BreakingCollection.cs +++ b/MoreLinq.Test/BreakingCollection.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/BreakingSequence.cs b/MoreLinq.Test/BreakingSequence.cs index 1e1db3c6b..9ed0ccaae 100644 --- a/MoreLinq.Test/BreakingSequence.cs +++ b/MoreLinq.Test/BreakingSequence.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/CartesianTest.cs b/MoreLinq.Test/CartesianTest.cs index 293ecb5a6..c4869553e 100644 --- a/MoreLinq.Test/CartesianTest.cs +++ b/MoreLinq.Test/CartesianTest.cs @@ -60,7 +60,7 @@ public void TestCartesianProductCount() Assert.AreEqual( expectedCount, result.Count() ); } - + /// /// Verify that each combination is produced in the Cartesian product /// @@ -107,4 +107,4 @@ public void TestEmptyCartesianEvaluation() Assert.AreEqual(0, resultC.Count()); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/Combinatorics.cs b/MoreLinq.Test/Combinatorics.cs index a107f8ec5..aa43fae06 100644 --- a/MoreLinq.Test/Combinatorics.cs +++ b/MoreLinq.Test/Combinatorics.cs @@ -14,4 +14,4 @@ public static double Factorial(int n) public static double Binomial(int n, int k) => Factorial(n) / (Factorial(n - k) * Factorial(k)); } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/CompareCountTest.cs b/MoreLinq.Test/CompareCountTest.cs index bd40d0de0..237d8635b 100644 --- a/MoreLinq.Test/CompareCountTest.cs +++ b/MoreLinq.Test/CompareCountTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Jonas Nyrup. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/Comparer.cs b/MoreLinq.Test/Comparer.cs index 74fb5d8ca..ea9688004 100644 --- a/MoreLinq.Test/Comparer.cs +++ b/MoreLinq.Test/Comparer.cs @@ -25,4 +25,4 @@ public DelegatingComparer(Func comparer) public int Compare(T x, T y) => _comparer(x, y); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/ConcatTest.cs b/MoreLinq.Test/ConcatTest.cs index b548bf5ed..c7bb76c09 100644 --- a/MoreLinq.Test/ConcatTest.cs +++ b/MoreLinq.Test/ConcatTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,8 +25,8 @@ public class ConcatTest { #region Concat with single head and tail sequence - // NOTE: Concat with single head and tail sequence is now - // implemented in terms of Prepend so the tests are identical. + // NOTE: Concat with single head and tail sequence is now + // implemented in terms of Prepend so the tests are identical. [Test] public void ConcatWithNonEmptyTailSequence() diff --git a/MoreLinq.Test/ConsumeTest.cs b/MoreLinq.Test/ConsumeTest.cs index f1b39c713..ebc8f4e88 100644 --- a/MoreLinq.Test/ConsumeTest.cs +++ b/MoreLinq.Test/ConsumeTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/CountBetweenTest.cs b/MoreLinq.Test/CountBetweenTest.cs index 41be548d2..2cbf6f5d9 100644 --- a/MoreLinq.Test/CountBetweenTest.cs +++ b/MoreLinq.Test/CountBetweenTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/CountByTest.cs b/MoreLinq.Test/CountByTest.cs index 768e68036..ec980ccd1 100644 --- a/MoreLinq.Test/CountByTest.cs +++ b/MoreLinq.Test/CountByTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -49,7 +49,7 @@ public void CountByWithSecondOccurenceImmediatelyAfterFirst() KeyValuePair.Create('e', 1), KeyValuePair.Create('r', 1)); } - + [Test] public void CountByEvenOddTest() { @@ -70,7 +70,7 @@ public void CountByWithEqualityComparer() KeyValuePair.Create("B", 2), KeyValuePair.Create("c", 1)); } - + [Test] public void CountByHasKeysOrderedLikeGroupBy() { @@ -81,7 +81,7 @@ public void CountByHasKeysOrderedLikeGroupBy() countByKeys.AssertSequenceEqual(groupByKeys); } - + [Test] public void CountByIsLazy() { diff --git a/MoreLinq.Test/CurrentThreadCultureScope.cs b/MoreLinq.Test/CurrentThreadCultureScope.cs index bfc6680ef..4a5dad3ce 100644 --- a/MoreLinq.Test/CurrentThreadCultureScope.cs +++ b/MoreLinq.Test/CurrentThreadCultureScope.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,7 +21,7 @@ namespace MoreLinq.Test sealed class CurrentThreadCultureScope : Scope { - public CurrentThreadCultureScope(CultureInfo @new) : + public CurrentThreadCultureScope(CultureInfo @new) : base(CultureInfo.CurrentCulture) { Install(@new); @@ -41,4 +41,4 @@ static void Install(CultureInfo value) #endif } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/DistinctByTest.cs b/MoreLinq.Test/DistinctByTest.cs index af742132c..ba907403d 100644 --- a/MoreLinq.Test/DistinctByTest.cs +++ b/MoreLinq.Test/DistinctByTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/EndsWithTest.cs b/MoreLinq.Test/EndsWithTest.cs index 73908392e..783e37be6 100644 --- a/MoreLinq.Test/EndsWithTest.cs +++ b/MoreLinq.Test/EndsWithTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/EqualityComparer.cs b/MoreLinq.Test/EqualityComparer.cs index f3426b8ec..5eb9ba1a4 100644 --- a/MoreLinq.Test/EqualityComparer.cs +++ b/MoreLinq.Test/EqualityComparer.cs @@ -31,4 +31,4 @@ public DelegatingComparer(Func comparer) public int GetHashCode(T obj) => _hasher(obj); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/EquiZipTest.cs b/MoreLinq.Test/EquiZipTest.cs index a5abd8b29..182621ed8 100644 --- a/MoreLinq.Test/EquiZipTest.cs +++ b/MoreLinq.Test/EquiZipTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/EvaluateTest.cs b/MoreLinq.Test/EvaluateTest.cs index d6a7af419..7330fce27 100644 --- a/MoreLinq.Test/EvaluateTest.cs +++ b/MoreLinq.Test/EvaluateTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Felipe Sateler. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/ExactlyTest.cs b/MoreLinq.Test/ExactlyTest.cs index 94bce6318..442ccac80 100644 --- a/MoreLinq.Test/ExactlyTest.cs +++ b/MoreLinq.Test/ExactlyTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/ExceptByTest.cs b/MoreLinq.Test/ExceptByTest.cs index dc3d72201..1c72fd9c8 100644 --- a/MoreLinq.Test/ExceptByTest.cs +++ b/MoreLinq.Test/ExceptByTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/ExcludeTest.cs b/MoreLinq.Test/ExcludeTest.cs index c036ab007..00bfacd02 100644 --- a/MoreLinq.Test/ExcludeTest.cs +++ b/MoreLinq.Test/ExcludeTest.cs @@ -144,4 +144,4 @@ public void TestExcludeStartIndexGreaterThanSequenceLength() Assert.IsTrue(result.SequenceEqual(sequence)); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/FallbackIfEmptyTest.cs b/MoreLinq.Test/FallbackIfEmptyTest.cs index fd1bfe38e..991140b0a 100644 --- a/MoreLinq.Test/FallbackIfEmptyTest.cs +++ b/MoreLinq.Test/FallbackIfEmptyTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/FillBackwardTest.cs b/MoreLinq.Test/FillBackwardTest.cs index aa181de8c..423d140a3 100644 --- a/MoreLinq.Test/FillBackwardTest.cs +++ b/MoreLinq.Test/FillBackwardTest.cs @@ -62,4 +62,4 @@ public void FillBackwardWithFillSelector() })); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/FillForwardTest.cs b/MoreLinq.Test/FillForwardTest.cs index 64839bff2..3c0c37180 100644 --- a/MoreLinq.Test/FillForwardTest.cs +++ b/MoreLinq.Test/FillForwardTest.cs @@ -83,4 +83,4 @@ select line.Trim() into line })); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/FlattenTest.cs b/MoreLinq.Test/FlattenTest.cs index db906f624..a861e815a 100644 --- a/MoreLinq.Test/FlattenTest.cs +++ b/MoreLinq.Test/FlattenTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/FoldTest.cs b/MoreLinq.Test/FoldTest.cs index 7a904e5db..90906849c 100644 --- a/MoreLinq.Test/FoldTest.cs +++ b/MoreLinq.Test/FoldTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -67,4 +67,4 @@ public void Fold() using (var ts = alphabet.Take(16).AsTestingSequence()) Assert.That(ts.Fold((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) => string.Join(string.Empty, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)), Is.EqualTo("abcdefghijklmnop"), "fold 16"); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/ForEachTest.cs b/MoreLinq.Test/ForEachTest.cs index d30252be8..ddfd5f1e7 100644 --- a/MoreLinq.Test/ForEachTest.cs +++ b/MoreLinq.Test/ForEachTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/FromTest.cs b/MoreLinq.Test/FromTest.cs index 3ef67f062..9577fe231 100644 --- a/MoreLinq.Test/FromTest.cs +++ b/MoreLinq.Test/FromTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Felipe Sateler. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/FullGroupJoinTest.cs b/MoreLinq.Test/FullGroupJoinTest.cs index 86746debc..a17164c29 100644 --- a/MoreLinq.Test/FullGroupJoinTest.cs +++ b/MoreLinq.Test/FullGroupJoinTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2015 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -144,4 +144,3 @@ public void FullGroupPreservesOrder(OverloadCase overloadCase) } } } - diff --git a/MoreLinq.Test/FullJoinTest.cs b/MoreLinq.Test/FullJoinTest.cs index 226510b3a..c460a3264 100644 --- a/MoreLinq.Test/FullJoinTest.cs +++ b/MoreLinq.Test/FullJoinTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2015 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -204,4 +204,3 @@ public void FullJoinEmptyRight() } } } - diff --git a/MoreLinq.Test/GenerateTest.cs b/MoreLinq.Test/GenerateTest.cs index 15ddc4635..6e04013aa 100644 --- a/MoreLinq.Test/GenerateTest.cs +++ b/MoreLinq.Test/GenerateTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/GroupAdjacentTest.cs b/MoreLinq.Test/GroupAdjacentTest.cs index d53f13289..926f8fb25 100644 --- a/MoreLinq.Test/GroupAdjacentTest.cs +++ b/MoreLinq.Test/GroupAdjacentTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -52,7 +52,7 @@ public void GroupAdjacentSourceSequence() var source = new[] { one, two, three, four, five, six, seven, eight, nine, ten }; var groupings = source.GroupAdjacent(s => s.Length); - + using (var reader = groupings.Read()) { AssertGrouping(reader, 3, one, two); @@ -85,14 +85,14 @@ public void GroupAdjacentSourceSequenceElementSelector() { var source = new[] { - new { Month = 1, Value = 123 }, - new { Month = 1, Value = 456 }, - new { Month = 1, Value = 789 }, - new { Month = 2, Value = 987 }, - new { Month = 2, Value = 654 }, - new { Month = 2, Value = 321 }, - new { Month = 3, Value = 789 }, - new { Month = 3, Value = 456 }, + new { Month = 1, Value = 123 }, + new { Month = 1, Value = 456 }, + new { Month = 1, Value = 789 }, + new { Month = 2, Value = 987 }, + new { Month = 2, Value = 654 }, + new { Month = 2, Value = 321 }, + new { Month = 3, Value = 789 }, + new { Month = 3, Value = 456 }, new { Month = 3, Value = 123 }, new { Month = 1, Value = 123 }, new { Month = 1, Value = 456 }, @@ -116,14 +116,14 @@ public void GroupAdjacentSourceSequenceElementSelectorComparer() { var source = new[] { - new { Month = "jan", Value = 123 }, - new { Month = "Jan", Value = 456 }, - new { Month = "JAN", Value = 789 }, - new { Month = "feb", Value = 987 }, - new { Month = "Feb", Value = 654 }, - new { Month = "FEB", Value = 321 }, - new { Month = "mar", Value = 789 }, - new { Month = "Mar", Value = 456 }, + new { Month = "jan", Value = 123 }, + new { Month = "Jan", Value = 456 }, + new { Month = "JAN", Value = 789 }, + new { Month = "feb", Value = 987 }, + new { Month = "Feb", Value = 654 }, + new { Month = "FEB", Value = 321 }, + new { Month = "mar", Value = 789 }, + new { Month = "Mar", Value = 456 }, new { Month = "MAR", Value = 123 }, new { Month = "jan", Value = 123 }, new { Month = "Jan", Value = 456 }, @@ -202,7 +202,7 @@ public void GroupAdjacentSourceSequenceResultSelectorComparer() } } - static void AssertGrouping(SequenceReader> reader, + static void AssertGrouping(SequenceReader> reader, TKey key, params TElement[] elements) { var grouping = reader.Read(); diff --git a/MoreLinq.Test/IndexTest.cs b/MoreLinq.Test/IndexTest.cs index 1392bfdf2..ecc200e1d 100644 --- a/MoreLinq.Test/IndexTest.cs +++ b/MoreLinq.Test/IndexTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/InsertTest.cs b/MoreLinq.Test/InsertTest.cs index 22b619386..2c9e9241e 100644 --- a/MoreLinq.Test/InsertTest.cs +++ b/MoreLinq.Test/InsertTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/InterleaveTest.cs b/MoreLinq.Test/InterleaveTest.cs index 592782482..c7969d291 100644 --- a/MoreLinq.Test/InterleaveTest.cs +++ b/MoreLinq.Test/InterleaveTest.cs @@ -19,7 +19,7 @@ public void TestInterleaveIsLazy() } /// - /// Verify that interleaving disposes those enumerators that it managed + /// Verify that interleaving disposes those enumerators that it managed /// to open successfully /// [Test] @@ -134,4 +134,4 @@ public void TestInterleaveDisposesAllIterators() Assert.IsTrue(disposedSequenceA && disposedSequenceB && disposedSequenceC && disposedSequenceD); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/KeyValuePair.cs b/MoreLinq.Test/KeyValuePair.cs index 295ea0a2d..a1f79affd 100644 --- a/MoreLinq.Test/KeyValuePair.cs +++ b/MoreLinq.Test/KeyValuePair.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/LagTest.cs b/MoreLinq.Test/LagTest.cs index 0b6f1184a..672e3c1a1 100644 --- a/MoreLinq.Test/LagTest.cs +++ b/MoreLinq.Test/LagTest.cs @@ -115,4 +115,4 @@ public void TestLagPassesCorrectLagValuesOffsetBy2() Assert.IsTrue(result.Take(2).All(x => (x.A - x.B) == x.A)); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/LeadTest.cs b/MoreLinq.Test/LeadTest.cs index d1788464c..d5e0d8350 100644 --- a/MoreLinq.Test/LeadTest.cs +++ b/MoreLinq.Test/LeadTest.cs @@ -39,7 +39,7 @@ public void TestLeadZeroOffset() } /// - /// Verify that lead can accept and propagate a default value passed to it. + /// Verify that lead can accept and propagate a default value passed to it. /// [Test] public void TestLeadExplicitDefaultValue() @@ -117,4 +117,4 @@ public void TestLeadPassesCorrectValueOffsetBy2() Assert.IsTrue(result.Skip(count - 2).All(x => x.B == leadDefault && (x.A == count || x.A == count - 1))); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/LeftJoinTest.cs b/MoreLinq.Test/LeftJoinTest.cs index 8b73f123e..8884839e2 100644 --- a/MoreLinq.Test/LeftJoinTest.cs +++ b/MoreLinq.Test/LeftJoinTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2015 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -183,4 +183,3 @@ public void LeftJoinEmptyRight() } } } - diff --git a/MoreLinq.Test/MaxByTest.cs b/MoreLinq.Test/MaxByTest.cs index 238a24ac4..4c9094a5b 100644 --- a/MoreLinq.Test/MaxByTest.cs +++ b/MoreLinq.Test/MaxByTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/MinByTest.cs b/MoreLinq.Test/MinByTest.cs index 97a604ffe..a285c2a7f 100644 --- a/MoreLinq.Test/MinByTest.cs +++ b/MoreLinq.Test/MinByTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/MoreLinq.Test.csproj b/MoreLinq.Test/MoreLinq.Test.csproj index a1cd445ba..e44cc4acb 100644 --- a/MoreLinq.Test/MoreLinq.Test.csproj +++ b/MoreLinq.Test/MoreLinq.Test.csproj @@ -18,7 +18,7 @@ 7 618 - + diff --git a/MoreLinq.Test/MoveTest.cs b/MoreLinq.Test/MoveTest.cs index 41228355e..92fba0823 100644 --- a/MoreLinq.Test/MoveTest.cs +++ b/MoreLinq.Test/MoveTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -102,7 +102,7 @@ public void MoveWithFromIndexEqualsToIndex() { var source = Enumerable.Range(0, 10); var result = source.Move(5, 999, 5); - + Assert.That(source, Is.SameAs(result)); } @@ -111,7 +111,7 @@ public void MoveWithCountEqualsZero() { var source = Enumerable.Range(0, 10); var result = source.Move(5, 0, 999); - + Assert.That(source, Is.SameAs(result)); } } diff --git a/MoreLinq.Test/NullArgumentTest.cs b/MoreLinq.Test/NullArgumentTest.cs index 911bdb317..01ab7ba29 100644 --- a/MoreLinq.Test/NullArgumentTest.cs +++ b/MoreLinq.Test/NullArgumentTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/OrderByTest.cs b/MoreLinq.Test/OrderByTest.cs index b544e2bd8..336ba7cef 100644 --- a/MoreLinq.Test/OrderByTest.cs +++ b/MoreLinq.Test/OrderByTest.cs @@ -119,4 +119,4 @@ public void TestThenByComparerPreserved() Assert.IsTrue(resultB1.SequenceEqual(resultB2)); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/PadStartTest.cs b/MoreLinq.Test/PadStartTest.cs index 7e1dde6d5..0f6fd8de3 100644 --- a/MoreLinq.Test/PadStartTest.cs +++ b/MoreLinq.Test/PadStartTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/PadTest.cs b/MoreLinq.Test/PadTest.cs index 787d7a37f..6a333bf82 100644 --- a/MoreLinq.Test/PadTest.cs +++ b/MoreLinq.Test/PadTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/PairwiseTest.cs b/MoreLinq.Test/PairwiseTest.cs index 21b4b3adf..ba8e75ea3 100644 --- a/MoreLinq.Test/PairwiseTest.cs +++ b/MoreLinq.Test/PairwiseTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/PartialSortByTest.cs b/MoreLinq.Test/PartialSortByTest.cs index 7537be577..0855700be 100644 --- a/MoreLinq.Test/PartialSortByTest.cs +++ b/MoreLinq.Test/PartialSortByTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -102,4 +102,4 @@ public void PartialSortByIsStable() Assert.That(mismatchIndex, Is.Null, "Mismatch index"); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/PartialSortTest.cs b/MoreLinq.Test/PartialSortTest.cs index 8697164a9..0134ea935 100644 --- a/MoreLinq.Test/PartialSortTest.cs +++ b/MoreLinq.Test/PartialSortTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -107,4 +107,4 @@ public void PartialSortByIsStable() Assert.That(mismatchIndex, Is.Null, "Mismatch index"); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/PermutationsTest.cs b/MoreLinq.Test/PermutationsTest.cs index ff7036483..7c5a83877 100644 --- a/MoreLinq.Test/PermutationsTest.cs +++ b/MoreLinq.Test/PermutationsTest.cs @@ -180,4 +180,4 @@ public void TestPermutationsAreIndependent() } } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/PipeTest.cs b/MoreLinq.Test/PipeTest.cs index cf0a0b700..104cb0b0a 100644 --- a/MoreLinq.Test/PipeTest.cs +++ b/MoreLinq.Test/PipeTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/PreScanTest.cs b/MoreLinq.Test/PreScanTest.cs index 37998b19d..ad08d078f 100644 --- a/MoreLinq.Test/PreScanTest.cs +++ b/MoreLinq.Test/PreScanTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/PrependTest.cs b/MoreLinq.Test/PrependTest.cs index 73f410985..538489dc5 100644 --- a/MoreLinq.Test/PrependTest.cs +++ b/MoreLinq.Test/PrependTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/RandomSubsetTest.cs b/MoreLinq.Test/RandomSubsetTest.cs index 5130e196d..1190fe236 100644 --- a/MoreLinq.Test/RandomSubsetTest.cs +++ b/MoreLinq.Test/RandomSubsetTest.cs @@ -126,7 +126,7 @@ public void TestRandomSubsetLongerThanSequence2() /// It's actually a complicated matter to ensure that a random process does not exhibit /// any kind of bias. In this test, we want to make sure that the probability of any /// particular subset being returned is roughly the same as any other. Here's how. - /// + /// /// This test selects a random subset of length N from an ascending sequence 1..N. /// It then adds up the values of the random result into an accumulator array. After many /// iterations, we would hope that each index of the accumulator array approach the same @@ -138,7 +138,7 @@ public void TestRandomSubsetLongerThanSequence2() /// /// For math geeks who read this: /// A decreasing RSD demonstrates that the random subsets form a cumulative distribution - /// approaching unity (1.0). Which, given that the original sequence was monotonic, implies + /// approaching unity (1.0). Which, given that the original sequence was monotonic, implies /// there cannot be a selection bias in the returned subsets - quod erat demonstrandum (QED). /// [Test] @@ -218,4 +218,4 @@ static double StandardDeviationInternal(IEnumerable values, double avera return Math.Sqrt(values.Select(value => Math.Pow(value - average, 2.0)).Average()); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/RandomTest.cs b/MoreLinq.Test/RandomTest.cs index 47dcd8bc1..d626060ae 100644 --- a/MoreLinq.Test/RandomTest.cs +++ b/MoreLinq.Test/RandomTest.cs @@ -112,4 +112,4 @@ public void TestRandomEquivalence() Assert.IsTrue(valuesA.SequenceEqual(valuesB)); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/RankTest.cs b/MoreLinq.Test/RankTest.cs index b8ccfb16d..ab8be577a 100644 --- a/MoreLinq.Test/RankTest.cs +++ b/MoreLinq.Test/RankTest.cs @@ -145,4 +145,4 @@ public void TestRankCustomComparer() Assert.IsTrue(resultB.SequenceEqual(ordinals.Reverse())); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/RepeatTest.cs b/MoreLinq.Test/RepeatTest.cs index f807f593a..7584ab690 100644 --- a/MoreLinq.Test/RepeatTest.cs +++ b/MoreLinq.Test/RepeatTest.cs @@ -88,4 +88,4 @@ public void TestRepeatForeverIsLazy() new BreakingSequence().Repeat(); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/RightJoinTest.cs b/MoreLinq.Test/RightJoinTest.cs index 35c6698d0..00177d6bf 100644 --- a/MoreLinq.Test/RightJoinTest.cs +++ b/MoreLinq.Test/RightJoinTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2015 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -183,4 +183,3 @@ public void RightJoinEmptyRight() } } } - diff --git a/MoreLinq.Test/RunLengthEncodeTest.cs b/MoreLinq.Test/RunLengthEncodeTest.cs index 869700fdf..a80d5b3f3 100644 --- a/MoreLinq.Test/RunLengthEncodeTest.cs +++ b/MoreLinq.Test/RunLengthEncodeTest.cs @@ -41,7 +41,7 @@ public void TestRunLengthEncodeCustomComparer() var sequence = new[] { "a", "A", "a", "b", "b", "B", "B" }; var result = sequence.RunLengthEncode(StringComparer.CurrentCultureIgnoreCase) .Select(kvp => new KeyValuePair(kvp.Key.ToLower(), kvp.Value)); - var expectedResult = new[] {new KeyValuePair("a", 3), + var expectedResult = new[] {new KeyValuePair("a", 3), new KeyValuePair("b", 4)}; Assert.IsTrue(result.SequenceEqual(expectedResult)); @@ -89,4 +89,4 @@ public void TestRunLengthEncodeOneRun() Assert.IsTrue(result.SequenceEqual(expectedResult)); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/SampleData.cs b/MoreLinq.Test/SampleData.cs index 283eb08a3..5a2b4c7f0 100644 --- a/MoreLinq.Test/SampleData.cs +++ b/MoreLinq.Test/SampleData.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/ScanRightTest.cs b/MoreLinq.Test/ScanRightTest.cs index e1fe8261c..c71991ca7 100644 --- a/MoreLinq.Test/ScanRightTest.cs +++ b/MoreLinq.Test/ScanRightTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,7 @@ namespace MoreLinq.Test public class ScanRightTest { // ScanRight(source, func) - + [Test] public void ScanRightWithEmptySequence() { @@ -61,7 +61,7 @@ public void ScanRightIsLazy() } // ScanRight(source, seed, func) - + [TestCase(5)] [TestCase("c")] [TestCase(true)] diff --git a/MoreLinq.Test/ScanTest.cs b/MoreLinq.Test/ScanTest.cs index 7af5c7ad9..d6cfbce0b 100644 --- a/MoreLinq.Test/ScanTest.cs +++ b/MoreLinq.Test/ScanTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/Scope.cs b/MoreLinq.Test/Scope.cs index 8750e7d92..27a93c306 100644 --- a/MoreLinq.Test/Scope.cs +++ b/MoreLinq.Test/Scope.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,4 +35,4 @@ public virtual void Dispose() protected abstract void Restore(T old); } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/SegmentTest.cs b/MoreLinq.Test/SegmentTest.cs index 0729b725f..13090e5bd 100644 --- a/MoreLinq.Test/SegmentTest.cs +++ b/MoreLinq.Test/SegmentTest.cs @@ -131,4 +131,4 @@ public void VerifyCanSegmentByPrevious() Assert.IsTrue(result.All(s => s.Count() == repCount)); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/SequenceReader.cs b/MoreLinq.Test/SequenceReader.cs index 1e85afd22..39a9b756c 100644 --- a/MoreLinq.Test/SequenceReader.cs +++ b/MoreLinq.Test/SequenceReader.cs @@ -148,4 +148,4 @@ public virtual void Dispose() e.Dispose(); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/SequenceTest.cs b/MoreLinq.Test/SequenceTest.cs index f316e9c9a..9636f10cd 100644 --- a/MoreLinq.Test/SequenceTest.cs +++ b/MoreLinq.Test/SequenceTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/SingleOrFallbackTest.cs b/MoreLinq.Test/SingleOrFallbackTest.cs index ff599dc4e..95d8e76a1 100644 --- a/MoreLinq.Test/SingleOrFallbackTest.cs +++ b/MoreLinq.Test/SingleOrFallbackTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/SkipLastTest.cs b/MoreLinq.Test/SkipLastTest.cs index 73394fe44..fe74f6aa2 100644 --- a/MoreLinq.Test/SkipLastTest.cs +++ b/MoreLinq.Test/SkipLastTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/SkipUntilTest.cs b/MoreLinq.Test/SkipUntilTest.cs index 43b9437e5..b2fb3785e 100644 --- a/MoreLinq.Test/SkipUntilTest.cs +++ b/MoreLinq.Test/SkipUntilTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/SortedMergeTest.cs b/MoreLinq.Test/SortedMergeTest.cs index 4b3a57e71..27a156d89 100644 --- a/MoreLinq.Test/SortedMergeTest.cs +++ b/MoreLinq.Test/SortedMergeTest.cs @@ -23,7 +23,7 @@ public void TestSortedMergeIsLazy() } /// - /// Verify that SortedMerge disposes those enumerators that it managed + /// Verify that SortedMerge disposes those enumerators that it managed /// to open successfully /// [Test] @@ -179,4 +179,4 @@ public void TestSortedMergeAllSequencesDisposed() Assert.IsTrue(disposedSequenceA && disposedSequenceB && disposedSequenceC && disposedSequenceD); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/StartsWithTest.cs b/MoreLinq.Test/StartsWithTest.cs index 3cc906789..b1843ec39 100644 --- a/MoreLinq.Test/StartsWithTest.cs +++ b/MoreLinq.Test/StartsWithTest.cs @@ -92,4 +92,4 @@ public void StartsWithUsesSpecifiedEqualityComparerOrDefault() Assert.True(first.StartsWith(second, EqualityComparer.Create(delegate { return true; }))); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/SubsetTest.cs b/MoreLinq.Test/SubsetTest.cs index 31ee28551..db39a2e63 100644 --- a/MoreLinq.Test/SubsetTest.cs +++ b/MoreLinq.Test/SubsetTest.cs @@ -166,4 +166,4 @@ public void TestKSubsetExpectedResult() Assert.IsTrue(subset.SequenceEqual(expectedSubsets[index++])); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/TagFirstLastTest.cs b/MoreLinq.Test/TagFirstLastTest.cs index 1b64b7f69..7e8f3848f 100644 --- a/MoreLinq.Test/TagFirstLastTest.cs +++ b/MoreLinq.Test/TagFirstLastTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/TakeEveryTest.cs b/MoreLinq.Test/TakeEveryTest.cs index c74700f5d..0d1db54f7 100644 --- a/MoreLinq.Test/TakeEveryTest.cs +++ b/MoreLinq.Test/TakeEveryTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -69,4 +69,4 @@ public void TakeEveryIsLazy() new BreakingSequence().TakeEvery(1); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/TakeLastTest.cs b/MoreLinq.Test/TakeLastTest.cs index 8c858dc9c..09a3f2a63 100644 --- a/MoreLinq.Test/TakeLastTest.cs +++ b/MoreLinq.Test/TakeLastTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -80,4 +80,4 @@ static void AssertTakeLast(ICollection input, int count, Action x).TakeLast(count)); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/TakeUntilTest.cs b/MoreLinq.Test/TakeUntilTest.cs index 97dd7008e..4a00fc6f6 100644 --- a/MoreLinq.Test/TakeUntilTest.cs +++ b/MoreLinq.Test/TakeUntilTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/ToArrayByIndexTest.cs b/MoreLinq.Test/ToArrayByIndexTest.cs index 5f3cff49e..f5f06fb89 100644 --- a/MoreLinq.Test/ToArrayByIndexTest.cs +++ b/MoreLinq.Test/ToArrayByIndexTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/ToDataTableTest.cs b/MoreLinq.Test/ToDataTableTest.cs index 4d1bf2f16..527934922 100644 --- a/MoreLinq.Test/ToDataTableTest.cs +++ b/MoreLinq.Test/ToDataTableTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/ToDelimitedStringTest.cs b/MoreLinq.Test/ToDelimitedStringTest.cs index 2eedce8b9..8d7eb1f0a 100644 --- a/MoreLinq.Test/ToDelimitedStringTest.cs +++ b/MoreLinq.Test/ToDelimitedStringTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/TraverseTest.cs b/MoreLinq.Test/TraverseTest.cs index f78c89fef..37e54fd41 100644 --- a/MoreLinq.Test/TraverseTest.cs +++ b/MoreLinq.Test/TraverseTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Felipe Sateler. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/UnenumerableReadOnlyList.cs b/MoreLinq.Test/UnenumerableReadOnlyList.cs index ca298ce60..d03efa66f 100644 --- a/MoreLinq.Test/UnenumerableReadOnlyList.cs +++ b/MoreLinq.Test/UnenumerableReadOnlyList.cs @@ -25,7 +25,7 @@ public UnenumerableReadOnlyList(IReadOnlyList list) public IEnumerator GetEnumerator() => throw new NotImplementedException(); // all other IReadOnlyList members are forwarded back to the underlying private list public int Count => _list.Count; - + public T this[int index] => _list[index]; } } diff --git a/MoreLinq.Test/UnfoldTest.cs b/MoreLinq.Test/UnfoldTest.cs index b017327a8..02ae2ef3e 100644 --- a/MoreLinq.Test/UnfoldTest.cs +++ b/MoreLinq.Test/UnfoldTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/VerifiableEnumerator.cs b/MoreLinq.Test/VerifiableEnumerator.cs index e63bc4480..a4c38137c 100644 --- a/MoreLinq.Test/VerifiableEnumerator.cs +++ b/MoreLinq.Test/VerifiableEnumerator.cs @@ -140,4 +140,4 @@ public T Current public static IVerifiableEnumerable AsVerifiable(this IEnumerable sequence) => sequence as IVerifiableEnumerable ?? new VerifiableEnumerable(sequence); } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/WindowedTest.cs b/MoreLinq.Test/WindowedTest.cs index 94721e0ad..b80ed6c18 100644 --- a/MoreLinq.Test/WindowedTest.cs +++ b/MoreLinq.Test/WindowedTest.cs @@ -97,4 +97,4 @@ public void TestWindowedSmallerThanSequence() Assert.IsTrue(window.SequenceEqual(sequence.Skip(++index).Take(windowSize))); } } -} \ No newline at end of file +} diff --git a/MoreLinq.Test/ZipLongestTest.cs b/MoreLinq.Test/ZipLongestTest.cs index 4a2b58c12..b4bd77916 100644 --- a/MoreLinq.Test/ZipLongestTest.cs +++ b/MoreLinq.Test/ZipLongestTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.Test/ZipShortestTest.cs b/MoreLinq.Test/ZipShortestTest.cs index 630e8d4d0..7be594527 100644 --- a/MoreLinq.Test/ZipShortestTest.cs +++ b/MoreLinq.Test/ZipShortestTest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq.shfbproj b/MoreLinq.shfbproj index 96878bd77..2990dbb49 100644 --- a/MoreLinq.shfbproj +++ b/MoreLinq.shfbproj @@ -70,4 +70,4 @@ - \ No newline at end of file + diff --git a/MoreLinq/Acquire.cs b/MoreLinq/Acquire.cs index 9f9a4ac5f..b4425b7ab 100644 --- a/MoreLinq/Acquire.cs +++ b/MoreLinq/Acquire.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2012 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,9 +23,9 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Ensures that a source sequence of - /// objects are all acquired successfully. If the acquisition of any - /// one fails then those successfully + /// Ensures that a source sequence of + /// objects are all acquired successfully. If the acquisition of any + /// one fails then those successfully /// acquired till that point are disposed. /// /// Type of elements in sequence. @@ -37,7 +37,7 @@ static partial class MoreEnumerable /// /// This operator executes immediately. /// - + public static TSource[] Acquire(this IEnumerable source) where TSource : IDisposable { @@ -57,4 +57,4 @@ public static TSource[] Acquire(this IEnumerable source) } } } -} \ No newline at end of file +} diff --git a/MoreLinq/AggregateRight.cs b/MoreLinq/AggregateRight.cs index b4dc2222a..3069807d4 100644 --- a/MoreLinq/AggregateRight.cs +++ b/MoreLinq/AggregateRight.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,7 +25,7 @@ static partial class MoreEnumerable { /// /// Applies a right-associative accumulator function over a sequence. - /// This operator is the right-associative version of the + /// This operator is the right-associative version of the /// LINQ operator. /// /// The type of the elements of source. @@ -57,7 +57,7 @@ public static TSource AggregateRight(this IEnumerable source, /// /// Applies a right-associative accumulator function over a sequence. /// The specified seed value is used as the initial accumulator value. - /// This operator is the right-associative version of the + /// This operator is the right-associative version of the /// LINQ operator. /// /// The type of the elements of source. @@ -88,9 +88,9 @@ public static TAccumulate AggregateRight(this IEnumerable< /// /// Applies a right-associative accumulator function over a sequence. - /// The specified seed value is used as the initial accumulator value, + /// The specified seed value is used as the initial accumulator value, /// and the specified function is used to select the result value. - /// This operator is the right-associative version of the + /// This operator is the right-associative version of the /// LINQ operator. /// /// The type of the elements of source. diff --git a/MoreLinq/AssemblyInfo.cs b/MoreLinq/AssemblyInfo.cs index f90864c78..28e64cc82 100644 --- a/MoreLinq/AssemblyInfo.cs +++ b/MoreLinq/AssemblyInfo.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -43,4 +43,4 @@ // ID of the typelib if this project is exposed to COM. [assembly: Guid("fc632c9d-390e-4902-8c1c-3e57b08c1d38")] -#endif \ No newline at end of file +#endif diff --git a/MoreLinq/Assert.cs b/MoreLinq/Assert.cs index 470e8637b..722313366 100644 --- a/MoreLinq/Assert.cs +++ b/MoreLinq/Assert.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2013 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,12 +33,12 @@ static partial class MoreEnumerable /// Returns the original sequence. /// /// The input sequence - /// contains an element that does not meet the condition being + /// contains an element that does not meet the condition being /// asserted. /// /// This operator uses deferred execution and streams its results. /// - + public static IEnumerable Assert(this IEnumerable source, Func predicate) { return Assert(source, predicate, null); @@ -58,8 +58,8 @@ public static IEnumerable Assert(this IEnumerable sou /// /// This operator uses deferred execution and streams its results. /// - - public static IEnumerable Assert(this IEnumerable source, + + public static IEnumerable Assert(this IEnumerable source, Func predicate, Func errorSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -77,4 +77,4 @@ public static IEnumerable Assert(this IEnumerable sou } } } -} \ No newline at end of file +} diff --git a/MoreLinq/AssertCount.cs b/MoreLinq/AssertCount.cs index b736989d1..18164114c 100644 --- a/MoreLinq/AssertCount.cs +++ b/MoreLinq/AssertCount.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2009 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -40,7 +40,7 @@ static partial class MoreEnumerable /// /// This operator uses deferred execution and streams its results. /// - + public static IEnumerable AssertCount(this IEnumerable source, int count) => AssertCountImpl(source, count, DefaultErrorSelector); @@ -61,14 +61,14 @@ public static IEnumerable AssertCount(this IEnumerable /// This operator uses deferred execution and streams its results. /// - - public static IEnumerable AssertCount(this IEnumerable source, + + public static IEnumerable AssertCount(this IEnumerable source, int count, Func errorSelector) => AssertCountImpl(source, count, errorSelector); static Exception OnAssertCountFailure(int cmp, int count) { - var message = cmp < 0 + var message = cmp < 0 ? "Sequence contains too few elements when exactly {0} were expected." : "Sequence contains too many elements when exactly {0} were expected."; return new SequenceException(string.Format(message, count.ToString("N0"))); diff --git a/MoreLinq/Batch.cs b/MoreLinq/Batch.cs index ba5b52399..06fb09fec 100644 --- a/MoreLinq/Batch.cs +++ b/MoreLinq/Batch.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2009 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,7 +30,7 @@ static partial class MoreEnumerable /// Size of buckets. /// A sequence of equally sized buckets containing elements of the source collection. /// - /// This operator uses deferred execution and streams its results (buckets and bucket content). + /// This operator uses deferred execution and streams its results (buckets and bucket content). /// public static IEnumerable> Batch(this IEnumerable source, int size) @@ -50,7 +50,7 @@ public static IEnumerable> Batch(this IEnumerable< /// /// This operator uses deferred execution and streams its results (buckets and bucket content). /// - + public static IEnumerable Batch(this IEnumerable source, int size, Func, TResult> resultSelector) { @@ -80,7 +80,7 @@ public static IEnumerable Batch(this IEnumerableThe second sequence of elements /// A projection function that combines elements from both sequences /// A sequence representing the Cartesian product of the two source sequences - + public static IEnumerable Cartesian(this IEnumerable first, IEnumerable second, Func resultSelector) { if (first == null) throw new ArgumentNullException(nameof(first)); if (second == null) throw new ArgumentNullException(nameof(second)); if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); - return from item1 in first + return from item1 in first from item2 in second // TODO buffer to avoid multiple enumerations select resultSelector(item1, item2); } } -} \ No newline at end of file +} diff --git a/MoreLinq/Concat.cs b/MoreLinq/Concat.cs index 7a5efc71d..1849b52c6 100644 --- a/MoreLinq/Concat.cs +++ b/MoreLinq/Concat.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,7 +30,7 @@ static partial class MoreEnumerable /// All elements of the tail. Must not be null. /// A sequence consisting of the head elements and the given tail elements. /// This operator uses deferred execution and streams its results. - + public static IEnumerable Concat(this T head, IEnumerable tail) { if (tail == null) throw new ArgumentNullException(nameof(tail)); @@ -45,7 +45,7 @@ public static IEnumerable Concat(this T head, IEnumerable tail) /// Tail element of the new sequence. /// A sequence consisting of the head elements and the given tail element. /// This operator uses deferred execution and streams its results. - + public static IEnumerable Concat(this IEnumerable head, T tail) { if (head == null) throw new ArgumentNullException(nameof(head)); @@ -54,4 +54,4 @@ public static IEnumerable Concat(this IEnumerable head, T tail) : PcNode.WithSource(head).Concat(tail); } } -} \ No newline at end of file +} diff --git a/MoreLinq/Consume.cs b/MoreLinq/Consume.cs index 7b79489b5..924fc6709 100644 --- a/MoreLinq/Consume.cs +++ b/MoreLinq/Consume.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,7 +28,7 @@ static partial class MoreEnumerable /// /// Element type of the sequence /// Source to consume - + public static void Consume(this IEnumerable source) { if (source == null) throw new ArgumentNullException(nameof(source)); diff --git a/MoreLinq/CountBy.cs b/MoreLinq/CountBy.cs index fae6210d0..5b0a105cb 100644 --- a/MoreLinq/CountBy.cs +++ b/MoreLinq/CountBy.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,7 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Applies a key-generating function to each element of a sequence and returns a sequence of + /// Applies a key-generating function to each element of a sequence and returns a sequence of /// unique keys and their number of occurrences in the original sequence. /// /// Type of the elements of the source sequence. @@ -37,7 +37,7 @@ public static IEnumerable> CountBy(this I } /// - /// Applies a key-generating function to each element of a sequence and returns a sequence of + /// Applies a key-generating function to each element of a sequence and returns a sequence of /// unique keys and their number of occurrences in the original sequence. /// An additional argument specifies a comparer to use for testing equivalence of keys. /// diff --git a/MoreLinq/CountMethods.cs b/MoreLinq/CountMethods.cs index 96f8e11fe..10ee9d77f 100644 --- a/MoreLinq/CountMethods.cs +++ b/MoreLinq/CountMethods.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -100,7 +100,7 @@ public static bool Exactly(this IEnumerable source, int count) } /// - /// Determines whether or not the number of elements in the sequence is between + /// Determines whether or not the number of elements in the sequence is between /// an inclusive range of minimum and maximum integers. /// /// Element type of sequence @@ -154,7 +154,7 @@ static bool QuantityIterator(IEnumerable source, int limit, int min, int m } /// - /// Compares two sequences and returns an integer that indicates whether the first sequence + /// Compares two sequences and returns an integer that indicates whether the first sequence /// has fewer, the same or more elements than the second sequence. /// /// Element type of the first sequence @@ -163,7 +163,7 @@ static bool QuantityIterator(IEnumerable source, int limit, int min, int m /// The second sequence /// is null /// is null - /// -1 if the first sequence has the fewest elements, 0 if the two sequences have the same number of elements + /// -1 if the first sequence has the fewest elements, 0 if the two sequences have the same number of elements /// or 1 if the first sequence has the most elements. /// /// diff --git a/MoreLinq/DistinctBy.cs b/MoreLinq/DistinctBy.cs index bc341bb32..c8dc010a4 100644 --- a/MoreLinq/DistinctBy.cs +++ b/MoreLinq/DistinctBy.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -67,7 +67,7 @@ public static IEnumerable DistinctBy(this IEnumerable _() { var knownKeys = new HashSet(comparer); diff --git a/MoreLinq/EquiZip.cs b/MoreLinq/EquiZip.cs index ac89d1050..d94eb6ba3 100644 --- a/MoreLinq/EquiZip.cs +++ b/MoreLinq/EquiZip.cs @@ -62,11 +62,11 @@ public static IEnumerable EquiZip(this IEnume } /// - /// Returns a projection of tuples, where each tuple contains the N-th element + /// Returns a projection of tuples, where each tuple contains the N-th element /// from each of the argument sequences. /// /// - /// If the three input sequences are of different lengths then + /// If the three input sequences are of different lengths then /// is thrown. /// This operator uses deferred execution and streams its results. /// @@ -105,11 +105,11 @@ public static IEnumerable EquiZip(this IEnumerable } /// - /// Returns a projection of tuples, where each tuple contains the N-th element + /// Returns a projection of tuples, where each tuple contains the N-th element /// from each of the argument sequences. /// /// - /// If the three input sequences are of different lengths then + /// If the three input sequences are of different lengths then /// is thrown. /// This operator uses deferred execution and streams its results. /// @@ -139,7 +139,7 @@ public static IEnumerable EquiZip(this IEnumerable /// public static IEnumerable EquiZip(this IEnumerable first, - IEnumerable second, IEnumerable third, IEnumerable fourth, + IEnumerable second, IEnumerable third, IEnumerable fourth, Func resultSelector) { if (first == null) throw new ArgumentNullException(nameof(first)); diff --git a/MoreLinq/Evaluate.cs b/MoreLinq/Evaluate.cs index 4f88aaa4e..ba8bfdfbb 100644 --- a/MoreLinq/Evaluate.cs +++ b/MoreLinq/Evaluate.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Felipe Sateler. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/ExceptBy.cs b/MoreLinq/ExceptBy.cs index c834882f1..d204ce8b0 100644 --- a/MoreLinq/ExceptBy.cs +++ b/MoreLinq/ExceptBy.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -41,7 +41,7 @@ static partial class MoreEnumerable /// The mapping from source element to key. /// A sequence of elements from whose key was not also a key for /// any element in . - + public static IEnumerable ExceptBy(this IEnumerable first, IEnumerable second, Func keySelector) @@ -69,7 +69,7 @@ public static IEnumerable ExceptBy(this IEnumerableTSource is used. /// A sequence of elements from whose key was not also a key for /// any element in . - + public static IEnumerable ExceptBy(this IEnumerable first, IEnumerable second, Func keySelector, diff --git a/MoreLinq/Exclude.cs b/MoreLinq/Exclude.cs index 8aabff952..2539194f3 100644 --- a/MoreLinq/Exclude.cs +++ b/MoreLinq/Exclude.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,7 +31,7 @@ public static partial class MoreEnumerable /// The zero-based index at which to begin excluding elements /// The number of elements to exclude /// A sequence that excludes the specified portion of elements - + public static IEnumerable Exclude(this IEnumerable sequence, int startIndex, int count) { if (sequence == null) throw new ArgumentNullException(nameof(sequence)); @@ -60,4 +60,4 @@ public static IEnumerable Exclude(this IEnumerable sequence, int startI } } } -} \ No newline at end of file +} diff --git a/MoreLinq/FillBackward.cs b/MoreLinq/FillBackward.cs index d6e57a9c0..4d0181960 100644 --- a/MoreLinq/FillBackward.cs +++ b/MoreLinq/FillBackward.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/FillForward.cs b/MoreLinq/FillForward.cs index 1200afa6c..a18ba4e2a 100644 --- a/MoreLinq/FillForward.cs +++ b/MoreLinq/FillForward.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/Flatten.cs b/MoreLinq/Flatten.cs index 30996c6cf..f6c88804d 100644 --- a/MoreLinq/Flatten.cs +++ b/MoreLinq/Flatten.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/Fold.cs b/MoreLinq/Fold.cs index e09eb4c2e..bc242d758 100644 --- a/MoreLinq/Fold.cs +++ b/MoreLinq/Fold.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2013 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/ForEach.cs b/MoreLinq/ForEach.cs index 6ac3e6bc9..8cf4ef8ec 100644 --- a/MoreLinq/ForEach.cs +++ b/MoreLinq/ForEach.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/From.cs b/MoreLinq/From.cs index d8f40680a..5e6c35360 100644 --- a/MoreLinq/From.cs +++ b/MoreLinq/From.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Felipe Sateler. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/FullGroupJoin.cs b/MoreLinq/FullGroupJoin.cs index 52d4dcd5c..5ac6ab212 100644 --- a/MoreLinq/FullGroupJoin.cs +++ b/MoreLinq/FullGroupJoin.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2015 Felipe Sateler. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/FullJoin.cs b/MoreLinq/FullJoin.cs index 4d4c8aad4..eacc8d21a 100644 --- a/MoreLinq/FullJoin.cs +++ b/MoreLinq/FullJoin.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copysecond (c) 2017 Atif Aziz. All seconds reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/GenerateByIndex.cs b/MoreLinq/GenerateByIndex.cs index 593a44a1a..6bbb03d60 100644 --- a/MoreLinq/GenerateByIndex.cs +++ b/MoreLinq/GenerateByIndex.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2009 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/GroupAdjacent.cs b/MoreLinq/GroupAdjacent.cs index 1aca75016..b24521998 100644 --- a/MoreLinq/GroupAdjacent.cs +++ b/MoreLinq/GroupAdjacent.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2012 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,27 +27,27 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Groups the adjacent elements of a sequence according to a + /// Groups the adjacent elements of a sequence according to a /// specified key selector function. /// - /// The type of the elements of + /// The type of the elements of /// . - /// The type of the key returned by + /// The type of the key returned by /// . /// A sequence whose elements to group. - /// A function to extract the key for each + /// A function to extract the key for each /// element. /// A sequence of groupings where each grouping /// () contains the key - /// and the adjacent elements in the same order as found in the + /// and the adjacent elements in the same order as found in the /// source sequence. /// - /// This method is implemented by using deferred execution and - /// streams the groupings. The grouping elements, however, are - /// buffered. Each grouping is therefore yielded as soon as it + /// This method is implemented by using deferred execution and + /// streams the groupings. The grouping elements, however, are + /// buffered. Each grouping is therefore yielded as soon as it /// is complete and before the next grouping occurs. /// - + public static IEnumerable> GroupAdjacent( this IEnumerable source, Func keySelector) @@ -56,30 +56,30 @@ public static IEnumerable> GroupAdjacent } /// - /// Groups the adjacent elements of a sequence according to a - /// specified key selector function and compares the keys by using a + /// Groups the adjacent elements of a sequence according to a + /// specified key selector function and compares the keys by using a /// specified comparer. /// - /// The type of the elements of + /// The type of the elements of /// . - /// The type of the key returned by + /// The type of the key returned by /// . /// A sequence whose elements to group. - /// A function to extract the key for each + /// A function to extract the key for each /// element. - /// An to + /// An to /// compare keys. /// A sequence of groupings where each grouping /// () contains the key - /// and the adjacent elements in the same order as found in the + /// and the adjacent elements in the same order as found in the /// source sequence. /// - /// This method is implemented by using deferred execution and - /// streams the groupings. The grouping elements, however, are - /// buffered. Each grouping is therefore yielded as soon as it + /// This method is implemented by using deferred execution and + /// streams the groupings. The grouping elements, however, are + /// buffered. Each grouping is therefore yielded as soon as it /// is complete and before the next grouping occurs. /// - + public static IEnumerable> GroupAdjacent( this IEnumerable source, Func keySelector, @@ -92,32 +92,32 @@ public static IEnumerable> GroupAdjacent } /// - /// Groups the adjacent elements of a sequence according to a - /// specified key selector function and projects the elements for + /// Groups the adjacent elements of a sequence according to a + /// specified key selector function and projects the elements for /// each group by using a specified function. /// - /// The type of the elements of + /// The type of the elements of /// . - /// The type of the key returned by + /// The type of the key returned by /// . /// The type of the elements in the /// resulting groupings. /// A sequence whose elements to group. - /// A function to extract the key for each + /// A function to extract the key for each /// element. - /// A function to map each source + /// A function to map each source /// element to an element in the resulting grouping. /// A sequence of groupings where each grouping /// () contains the key - /// and the adjacent elements (of type ) + /// and the adjacent elements (of type ) /// in the same order as found in the source sequence. /// - /// This method is implemented by using deferred execution and - /// streams the groupings. The grouping elements, however, are - /// buffered. Each grouping is therefore yielded as soon as it + /// This method is implemented by using deferred execution and + /// streams the groupings. The grouping elements, however, are + /// buffered. Each grouping is therefore yielded as soon as it /// is complete and before the next grouping occurs. /// - + public static IEnumerable> GroupAdjacent( this IEnumerable source, Func keySelector, @@ -127,35 +127,35 @@ public static IEnumerable> GroupAdjacent - /// Groups the adjacent elements of a sequence according to a - /// specified key selector function. The keys are compared by using - /// a comparer and each group's elements are projected by using a + /// Groups the adjacent elements of a sequence according to a + /// specified key selector function. The keys are compared by using + /// a comparer and each group's elements are projected by using a /// specified function. /// - /// The type of the elements of + /// The type of the elements of /// . - /// The type of the key returned by + /// The type of the key returned by /// . /// The type of the elements in the /// resulting groupings. /// A sequence whose elements to group. - /// A function to extract the key for each + /// A function to extract the key for each /// element. - /// A function to map each source + /// A function to map each source /// element to an element in the resulting grouping. - /// An to + /// An to /// compare keys. /// A sequence of groupings where each grouping /// () contains the key - /// and the adjacent elements (of type ) + /// and the adjacent elements (of type ) /// in the same order as found in the source sequence. /// - /// This method is implemented by using deferred execution and - /// streams the groupings. The grouping elements, however, are - /// buffered. Each grouping is therefore yielded as soon as it + /// This method is implemented by using deferred execution and + /// streams the groupings. The grouping elements, however, are + /// buffered. Each grouping is therefore yielded as soon as it /// is complete and before the next grouping occurs. /// - + public static IEnumerable> GroupAdjacent( this IEnumerable source, Func keySelector, @@ -171,19 +171,19 @@ public static IEnumerable> GroupAdjacent - /// Groups the adjacent elements of a sequence according to a - /// specified key selector function. The keys are compared by using - /// a comparer and each group's elements are projected by using a + /// Groups the adjacent elements of a sequence according to a + /// specified key selector function. The keys are compared by using + /// a comparer and each group's elements are projected by using a /// specified function. /// - /// The type of the elements of + /// The type of the elements of /// . - /// The type of the key returned by + /// The type of the key returned by /// . /// The type of the elements in the /// resulting sequence. /// A sequence whose elements to group. - /// A function to extract the key for each + /// A function to extract the key for each /// element. /// A function to map each key and /// associated source elements to a result object. @@ -191,9 +191,9 @@ public static IEnumerable> GroupAdjacent where each element represents /// a projection over a group and its key. /// - /// This method is implemented by using deferred execution and - /// streams the groupings. The grouping elements, however, are - /// buffered. Each grouping is therefore yielded as soon as it + /// This method is implemented by using deferred execution and + /// streams the groupings. The grouping elements, however, are + /// buffered. Each grouping is therefore yielded as soon as it /// is complete and before the next grouping occurs. /// @@ -214,31 +214,31 @@ public static IEnumerable GroupAdjacent( } /// - /// Groups the adjacent elements of a sequence according to a - /// specified key selector function. The keys are compared by using - /// a comparer and each group's elements are projected by using a + /// Groups the adjacent elements of a sequence according to a + /// specified key selector function. The keys are compared by using + /// a comparer and each group's elements are projected by using a /// specified function. /// - /// The type of the elements of + /// The type of the elements of /// . - /// The type of the key returned by + /// The type of the key returned by /// . /// The type of the elements in the /// resulting sequence. /// A sequence whose elements to group. - /// A function to extract the key for each + /// A function to extract the key for each /// element. /// A function to map each key and /// associated source elements to a result object. - /// An to + /// An to /// compare keys. /// A collection of elements of type /// where each element represents /// a projection over a group and its key. /// - /// This method is implemented by using deferred execution and - /// streams the groupings. The grouping elements, however, are - /// buffered. Each grouping is therefore yielded as soon as it + /// This method is implemented by using deferred execution and + /// streams the groupings. The grouping elements, however, are + /// buffered. Each grouping is therefore yielded as soon as it /// is complete and before the next grouping occurs. /// @@ -251,7 +251,7 @@ public static IEnumerable GroupAdjacent( if (source == null) throw new ArgumentNullException(nameof(source)); if (keySelector == null) throw new ArgumentNullException(nameof(keySelector)); if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); - + // This should be removed once the target framework is bumped to something that supports covariance TResult ResultSelectorWrapper(TKey key, IList group) => resultSelector(key, group); return GroupAdjacentImpl(source, keySelector, i => i, ResultSelectorWrapper, diff --git a/MoreLinq/Index.cs b/MoreLinq/Index.cs index 7b6baf785..5fc811f95 100644 --- a/MoreLinq/Index.cs +++ b/MoreLinq/Index.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2012 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,23 +24,23 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Returns a sequence of - /// where the key is the zero-based index of the value in the source + /// Returns a sequence of + /// where the key is the zero-based index of the value in the source /// sequence. /// /// Type of elements in sequence. /// The source sequence. /// A sequence of . - /// This operator uses deferred execution and streams its + /// This operator uses deferred execution and streams its /// results. - + public static IEnumerable> Index(this IEnumerable source) { return source.Index(0); } /// - /// Returns a sequence of + /// Returns a sequence of /// where the key is the index of the value in the source sequence. /// An additional parameter specifies the starting index. /// @@ -48,9 +48,9 @@ public static IEnumerable> Index(this IEnume /// The source sequence. /// /// A sequence of . - /// This operator uses deferred execution and streams its + /// This operator uses deferred execution and streams its /// results. - + public static IEnumerable> Index(this IEnumerable source, int startIndex) { if (source == null) throw new ArgumentNullException(nameof(source)); diff --git a/MoreLinq/Insert.cs b/MoreLinq/Insert.cs index c78299189..098205e78 100644 --- a/MoreLinq/Insert.cs +++ b/MoreLinq/Insert.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/Interleave.cs b/MoreLinq/Interleave.cs index a027bc17a..a3f4654a4 100644 --- a/MoreLinq/Interleave.cs +++ b/MoreLinq/Interleave.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -43,7 +43,7 @@ public static partial class MoreEnumerable /// The first sequence in the interleave group /// The other sequences in the interleave group /// A sequence of interleaved elements from all of the source sequences - + public static IEnumerable Interleave(this IEnumerable sequence, params IEnumerable[] otherSequences) { return Interleave(sequence, ImbalancedInterleaveStrategy.Skip, otherSequences); @@ -167,4 +167,4 @@ enum ImbalancedInterleaveStrategy Stop, } } -} \ No newline at end of file +} diff --git a/MoreLinq/Lag.cs b/MoreLinq/Lag.cs index 1b09581f8..4ed6d9c27 100644 --- a/MoreLinq/Lag.cs +++ b/MoreLinq/Lag.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,7 +35,7 @@ public static partial class MoreEnumerable /// The offset (expressed as a positive number) by which to lag each value of the sequence /// A projection function which accepts the current and lagged items (in that order) and returns a result /// A sequence produced by projecting each element of the sequence with its lagged pairing - + public static IEnumerable Lag(this IEnumerable source, int offset, Func resultSelector) { return Lag(source, offset, default(TSource), resultSelector); @@ -54,7 +54,7 @@ public static IEnumerable Lag(this IEnumerableA default value supplied for the lagged value prior to the lag offset /// A projection function which accepts the current and lagged items (in that order) and returns a result /// A sequence produced by projecting each element of the sequence with its lagged pairing - + public static IEnumerable Lag(this IEnumerable source, int offset, TSource defaultLagValue, Func resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); diff --git a/MoreLinq/Lead.cs b/MoreLinq/Lead.cs index bf50ce2d1..bc7ccd6e3 100644 --- a/MoreLinq/Lead.cs +++ b/MoreLinq/Lead.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -36,7 +36,7 @@ public static partial class MoreEnumerable /// The offset (expressed as a positive number) by which to lead each element of the sequence /// A projection function which accepts the current and subsequent (lead) element (in that order) and produces a result /// A sequence produced by projecting each element of the sequence with its lead pairing - + public static IEnumerable Lead(this IEnumerable source, int offset, Func resultSelector) { return Lead(source, offset, default(TSource), resultSelector); @@ -55,7 +55,7 @@ public static IEnumerable Lead(this IEnumerableA default value supplied for the leading element when none is available /// A projection function which accepts the current and subsequent (lead) element (in that order) and produces a result /// A sequence produced by projecting each element of the sequence with its lead pairing - + public static IEnumerable Lead(this IEnumerable source, int offset, TSource defaultLeadValue, Func resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -87,4 +87,4 @@ public static IEnumerable Lead(this IEnumerable(this IEnumerable source, /// /// Returns the maximal element of the given sequence, based on - /// the given projection and the specified comparer for projected values. + /// the given projection and the specified comparer for projected values. /// /// /// If more than one element has the maximal projected value, the first @@ -61,10 +61,10 @@ public static TSource MaxBy(this IEnumerable source, /// Selector to use to pick the results to compare /// Comparer to use to compare projected values /// The maximal element, according to the projection. - /// , + /// , /// or is null /// is empty - + public static TSource MaxBy(this IEnumerable source, Func selector, IComparer comparer) { diff --git a/MoreLinq/MinBy.cs b/MoreLinq/MinBy.cs index 13d771066..aee30acd0 100644 --- a/MoreLinq/MinBy.cs +++ b/MoreLinq/MinBy.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -39,7 +39,7 @@ static partial class MoreEnumerable /// The minimal element, according to the projection. /// or is null /// is empty - + public static TSource MinBy(this IEnumerable source, Func selector) { @@ -61,7 +61,7 @@ public static TSource MinBy(this IEnumerable source, /// Selector to use to pick the results to compare /// Comparer to use to compare projected values /// The minimal element, according to the projection. - /// , + /// , /// or is null /// is empty diff --git a/MoreLinq/MoreEnumerable.cs b/MoreLinq/MoreEnumerable.cs index 54b78b99c..d04d749e3 100644 --- a/MoreLinq/MoreEnumerable.cs +++ b/MoreLinq/MoreEnumerable.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,11 +21,11 @@ namespace MoreLinq using System.Collections.Generic; /// - /// Provides a set of static methods for querying objects that + /// Provides a set of static methods for querying objects that /// implement . The actual methods /// are implemented in files reflecting the method name. /// - + public static partial class MoreEnumerable { static int? TryGetCollectionCount(this IEnumerable source) diff --git a/MoreLinq/MoreLinq.csproj b/MoreLinq/MoreLinq.csproj index 615ac162c..61593eab1 100644 --- a/MoreLinq/MoreLinq.csproj +++ b/MoreLinq/MoreLinq.csproj @@ -54,7 +54,7 @@ $(DefineConstants);MORELINQ - + $(DefineConstants);MORELINQ;NO_SERIALIZATION_ATTRIBUTES;NO_EXCEPTION_SERIALIZATION;NO_TRACING;NO_COM diff --git a/MoreLinq/Move.cs b/MoreLinq/Move.cs index 6a11819ce..e6da5f25d 100644 --- a/MoreLinq/Move.cs +++ b/MoreLinq/Move.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/NestedLoops.cs b/MoreLinq/NestedLoops.cs index 269d014ed..fbf982c93 100644 --- a/MoreLinq/NestedLoops.cs +++ b/MoreLinq/NestedLoops.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,7 +35,7 @@ public static partial class MoreEnumerable /// Action delegate for which to produce a nested loop sequence /// A sequence of loop repetition counts /// A sequence of Action representing the expansion of a set of nested loops - + public static IEnumerable NestedLoops(this Action action, IEnumerable loopCounts) { if (action == null) throw new ArgumentNullException(nameof(action)); @@ -58,4 +58,4 @@ public static IEnumerable NestedLoops(this Action action, IEnumerableA key selector function /// A direction in which to order the elements (ascending, descending) /// An ordered copy of the source sequence - + public static IOrderedEnumerable OrderBy(this IEnumerable source, Func keySelector, OrderByDirection direction) { return OrderBy(source, keySelector, null, direction); @@ -48,7 +48,7 @@ public static IOrderedEnumerable OrderBy(this IEnumerable source, /// A direction in which to order the elements (ascending, descending) /// A comparer used to define the semantics of element comparison /// An ordered copy of the source sequence - + public static IOrderedEnumerable OrderBy(this IEnumerable source, Func keySelector, IComparer comparer, OrderByDirection direction) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -67,7 +67,7 @@ public static IOrderedEnumerable OrderBy(this IEnumerable source, /// A key selector function /// A direction in which to order the elements (ascending, descending) /// An ordered copy of the source sequence - + public static IOrderedEnumerable ThenBy(this IOrderedEnumerable source, Func keySelector, OrderByDirection direction) { return ThenBy(source, keySelector, null, direction); @@ -83,7 +83,7 @@ public static IOrderedEnumerable ThenBy(this IOrderedEnumerable s /// A direction in which to order the elements (ascending, descending) /// A comparer used to define the semantics of element comparison /// An ordered copy of the source sequence - + public static IOrderedEnumerable ThenBy(this IOrderedEnumerable source, Func keySelector, IComparer comparer, OrderByDirection direction) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -93,4 +93,4 @@ public static IOrderedEnumerable ThenBy(this IOrderedEnumerable s : source.ThenByDescending(keySelector, comparer); } } -} \ No newline at end of file +} diff --git a/MoreLinq/OrderByDirection.cs b/MoreLinq/OrderByDirection.cs index 4bd2fb8fc..730660837 100644 --- a/MoreLinq/OrderByDirection.cs +++ b/MoreLinq/OrderByDirection.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,7 @@ namespace MoreLinq /// /// Enumeration that defines values representing valid ordering directions for a sequence. /// - + public enum OrderByDirection { /// @@ -32,4 +32,4 @@ public enum OrderByDirection /// Descending = 1, } -} \ No newline at end of file +} diff --git a/MoreLinq/OrderedMerge.cs b/MoreLinq/OrderedMerge.cs index a3fb57804..298e90b5c 100644 --- a/MoreLinq/OrderedMerge.cs +++ b/MoreLinq/OrderedMerge.cs @@ -332,4 +332,4 @@ public static IEnumerable OrderedMerge( } } } -} \ No newline at end of file +} diff --git a/MoreLinq/Pad.cs b/MoreLinq/Pad.cs index f7d1c3f2a..3e85f4314 100644 --- a/MoreLinq/Pad.cs +++ b/MoreLinq/Pad.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,7 +24,7 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Pads a sequence with default values if it is narrower (shorter + /// Pads a sequence with default values if it is narrower (shorter /// in length) than a given width. /// /// The type of the elements of . @@ -42,7 +42,7 @@ static partial class MoreEnumerable /// int[] numbers = { 123, 456, 789 }; /// IEnumerable<int> result = numbers.Pad(5); /// - /// The result variable, when iterated over, will yield + /// The result variable, when iterated over, will yield /// 123, 456, 789 and two zeroes, in turn. /// @@ -52,7 +52,7 @@ public static IEnumerable Pad(this IEnumerable source } /// - /// Pads a sequence with a given filler value if it is narrower (shorter + /// Pads a sequence with a given filler value if it is narrower (shorter /// in length) than a given width. /// /// The type of the elements of . @@ -71,7 +71,7 @@ public static IEnumerable Pad(this IEnumerable source /// int[] numbers = { 123, 456, 789 }; /// IEnumerable<int> result = numbers.Pad(5, -1); /// - /// The result variable, when iterated over, will yield + /// The result variable, when iterated over, will yield /// 123, 456, and 789 followed by two occurrences of -1, in turn. /// @@ -83,7 +83,7 @@ public static IEnumerable Pad(this IEnumerable source } /// - /// Pads a sequence with a dynamic filler value if it is narrower (shorter + /// Pads a sequence with a dynamic filler value if it is narrower (shorter /// in length) than a given width. /// /// The type of the elements of . @@ -102,7 +102,7 @@ public static IEnumerable Pad(this IEnumerable source /// int[] numbers = { 0, 1, 2 }; /// IEnumerable<int> result = numbers.Pad(5, i => -i); /// - /// The result variable, when iterated over, will yield + /// The result variable, when iterated over, will yield /// 0, 1, 2, -3 and -4, in turn. /// @@ -133,4 +133,4 @@ static IEnumerable PadImpl(IEnumerable source, } } } -} \ No newline at end of file +} diff --git a/MoreLinq/PadStart.cs b/MoreLinq/PadStart.cs index 0541c4994..276d60d01 100644 --- a/MoreLinq/PadStart.cs +++ b/MoreLinq/PadStart.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,7 +24,7 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Pads a sequence with default values in the beginning if it is narrower (shorter + /// Pads a sequence with default values in the beginning if it is narrower (shorter /// in length) than a given width. /// /// The type of the elements of . @@ -51,7 +51,7 @@ public static IEnumerable PadStart(this IEnumerable s } /// - /// Pads a sequence with a given filler value in the beginning if it is narrower (shorter + /// Pads a sequence with a given filler value in the beginning if it is narrower (shorter /// in length) than a given width. /// An additional parameter specifies the value to use for padding. /// @@ -82,7 +82,7 @@ public static IEnumerable PadStart(this IEnumerable s } /// - /// Pads a sequence with a dynamic filler value in the beginning if it is narrower (shorter + /// Pads a sequence with a dynamic filler value in the beginning if it is narrower (shorter /// in length) than a given width. /// An additional parameter specifies the function to calculate padding. /// @@ -155,4 +155,4 @@ source is ICollection collection } } } -} \ No newline at end of file +} diff --git a/MoreLinq/Pairwise.cs b/MoreLinq/Pairwise.cs index da117d8ed..6895d4dbe 100644 --- a/MoreLinq/Pairwise.cs +++ b/MoreLinq/Pairwise.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2012 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,15 +23,15 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Returns a sequence resulting from applying a function to each - /// element in the source sequence and its - /// predecessor, with the exception of the first element which is + /// Returns a sequence resulting from applying a function to each + /// element in the source sequence and its + /// predecessor, with the exception of the first element which is /// only returned as the predecessor of the second element. /// /// The type of the elements of . /// The type of the element of the returned sequence. /// The source sequence. - /// A transform function to apply to + /// A transform function to apply to /// each pair of sequence. /// /// Returns the resulting sequence. @@ -44,7 +44,7 @@ static partial class MoreEnumerable /// int[] numbers = { 123, 456, 789 }; /// IEnumerable<int> result = numbers.Pairwise((a, b) => a + b); /// - /// The result variable, when iterated over, will yield + /// The result variable, when iterated over, will yield /// 579 and 1245, in turn. /// @@ -70,4 +70,4 @@ public static IEnumerable Pairwise(this IEnumerable GetEnumerator() IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } -} \ No newline at end of file +} diff --git a/MoreLinq/Permutations.cs b/MoreLinq/Permutations.cs index 00f77b25a..745aef6b8 100644 --- a/MoreLinq/Permutations.cs +++ b/MoreLinq/Permutations.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,10 +42,10 @@ class PermutationEnumerator : IEnumerator> // Second, the algorithm has been modified to use dynamically generated nested loop // state machines, rather than an integral computation of the factorial function // to determine when to terminate. The original algorithm required a priori knowledge - // of the number of iterations necessary to produce all permutations. This is a + // of the number of iterations necessary to produce all permutations. This is a // necessary step to avoid overflowing the range of the permutation arrays used. - // The number of permutation iterations is defined as the factorial of the original - // set size minus 1. + // The number of permutation iterations is defined as the factorial of the original + // set size minus 1. // // However, there's a fly in the ointment. The factorial function grows VERY rapidly. // 13! overflows the range of a Int32; while 28! overflows the range of decimal. @@ -53,14 +53,14 @@ class PermutationEnumerator : IEnumerator> // of N is equivalent to the evaluation of N-1 nested loops. Unfortunatley, you can't // just code up a variable number of nested loops ... this is where .NET generators // with their elegant 'yield return' syntax come to the rescue. - // + // // The methods of the Loop extension class (For and NestedLoops) provide the implementation // of dynamic nested loops using generators and sequence composition. In a nutshell, // the two Repeat() functions are the constructor of loops and nested loops, respectively. // The NestedLoops() function produces a composition of loops where the loop counter // for each nesting level is defined in a separate sequence passed in the call. // - // For example: NestedLoops( () => DoSomething(), new[] { 6, 8 } ) + // For example: NestedLoops( () => DoSomething(), new[] { 6, 8 } ) // // is equivalent to: for( int i = 0; i < 6; i++ ) // for( int j = 0; j < 8; j++ ) @@ -191,7 +191,7 @@ IList PermuteValueSet() /// The type of the elements in the sequence /// The original sequence to permute /// A sequence of lists representing permutations of the original sequence - + public static IEnumerable> Permutations(this IEnumerable sequence) { if (sequence == null) throw new ArgumentNullException(nameof(sequence)); @@ -206,4 +206,4 @@ public static IEnumerable> Permutations(this IEnumerable sequence } } } -} \ No newline at end of file +} diff --git a/MoreLinq/Pipe.cs b/MoreLinq/Pipe.cs index 48301fab8..474ef725e 100644 --- a/MoreLinq/Pipe.cs +++ b/MoreLinq/Pipe.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/PreScan.cs b/MoreLinq/PreScan.cs index b1f55dd4b..1a76a0c13 100644 --- a/MoreLinq/PreScan.cs +++ b/MoreLinq/PreScan.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2009 Konrad Rudolph. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/Prepend.cs b/MoreLinq/Prepend.cs index 3c3dad2b8..e19e16dc4 100644 --- a/MoreLinq/Prepend.cs +++ b/MoreLinq/Prepend.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2009 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -38,7 +38,7 @@ static partial class MoreEnumerable /// int[] numbers = { 1, 2, 3 }; /// IEnumerable<int> result = numbers.Prepend(0); /// - /// The result variable, when iterated over, will yield + /// The result variable, when iterated over, will yield /// 0, 1, 2 and 3, in turn. public static IEnumerable Prepend(this IEnumerable source, TSource value) @@ -49,4 +49,4 @@ public static IEnumerable Prepend(this IEnumerable so : PcNode.WithSource(source).Prepend(value); } } -} \ No newline at end of file +} diff --git a/MoreLinq/Random.cs b/MoreLinq/Random.cs index 41a961567..5d39bc989 100644 --- a/MoreLinq/Random.cs +++ b/MoreLinq/Random.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,7 +24,7 @@ namespace MoreLinq public static partial class MoreEnumerable { /// - /// Returns an infinite sequence of random integers using the standard + /// Returns an infinite sequence of random integers using the standard /// .NET random number generator. /// /// An infinite sequence of random integers @@ -56,7 +56,7 @@ public static IEnumerable Random() /// Random generator used to produce random numbers /// An infinite sequence of random integers /// Thrown if is . - + public static IEnumerable Random(Random rand) { if (rand == null) throw new ArgumentNullException(nameof(rand)); @@ -85,7 +85,7 @@ public static IEnumerable Random(Random rand) /// are generated on the same thread, the order of enumeration affects the /// resulting sequences. /// - + public static IEnumerable Random(int maxValue) { if (maxValue < 0) throw new ArgumentOutOfRangeException(nameof(maxValue)); @@ -101,7 +101,7 @@ public static IEnumerable Random(int maxValue) /// Exclusive upper bound for random values returned /// An infinite sequence of random integers /// Thrown if is . - + public static IEnumerable Random(Random rand, int maxValue) { if (rand == null) throw new ArgumentNullException(nameof(rand)); @@ -132,7 +132,7 @@ public static IEnumerable Random(Random rand, int maxValue) /// are generated on the same thread, the order of enumeration affects the /// resulting sequences. /// - + public static IEnumerable Random(int minValue, int maxValue) { return Random(GlobalRandom.Instance, minValue, maxValue); @@ -147,12 +147,12 @@ public static IEnumerable Random(int minValue, int maxValue) /// Exclusive upper bound of the values returned /// An infinite sequence of random integers /// Thrown if is . - + public static IEnumerable Random(Random rand, int minValue, int maxValue) { if (rand == null) throw new ArgumentNullException(nameof(rand)); if (minValue > maxValue) - throw new ArgumentOutOfRangeException( nameof(minValue), + throw new ArgumentOutOfRangeException( nameof(minValue), string.Format("The argument minValue ({0}) is greater than maxValue ({1})", minValue, maxValue) ); return RandomImpl(rand, r => r.Next(minValue, maxValue)); @@ -177,7 +177,7 @@ public static IEnumerable Random(Random rand, int minValue, int maxValue) /// are generated on the same thread, the order of enumeration affects the /// resulting sequences. /// - + public static IEnumerable RandomDouble() { return RandomDouble(GlobalRandom.Instance); @@ -190,14 +190,14 @@ public static IEnumerable RandomDouble() /// Generator used to produce random numbers /// An infinite sequence of random doubles /// Thrown if is . - + public static IEnumerable RandomDouble(Random rand) { if (rand == null) throw new ArgumentNullException(nameof(rand)); return RandomImpl(rand, r => r.NextDouble()); } - + /// /// This is the underlying implementation that all random operators use to /// produce a sequence of random values. @@ -251,4 +251,4 @@ protected override double Sample() } } } -} \ No newline at end of file +} diff --git a/MoreLinq/RandomSubset.cs b/MoreLinq/RandomSubset.cs index 86338329a..5577bcaa0 100644 --- a/MoreLinq/RandomSubset.cs +++ b/MoreLinq/RandomSubset.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,7 +30,7 @@ public static partial class MoreEnumerable /// The sequence from which to return random elements /// The size of the random subset to return /// A random sequence of elements in random order from the original sequence - + public static IEnumerable RandomSubset(this IEnumerable sequence, int subsetSize) { return RandomSubset(sequence, subsetSize, new Random()); @@ -44,7 +44,7 @@ public static IEnumerable RandomSubset(this IEnumerable sequence, int s /// The size of the random subset to return /// A random generator used as part of the selection algorithm /// A random sequence of elements in random order from the original sequence - + public static IEnumerable RandomSubset(this IEnumerable sequence, int subsetSize, Random rand) { if (rand == null) throw new ArgumentNullException(nameof(rand)); @@ -84,4 +84,4 @@ public static IEnumerable RandomSubset(this IEnumerable sequence, int s } } } -} \ No newline at end of file +} diff --git a/MoreLinq/Rank.cs b/MoreLinq/Rank.cs index e61fc85dc..d2c806ad0 100644 --- a/MoreLinq/Rank.cs +++ b/MoreLinq/Rank.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,7 +29,7 @@ public static partial class MoreEnumerable /// Type of item in the sequence /// The sequence whose items will be ranked /// A sequence of position integers representing the ranks of the corresponding items in the sequence - + public static IEnumerable Rank(this IEnumerable source) { return source.RankBy(x => x); @@ -42,7 +42,7 @@ public static IEnumerable Rank(this IEnumerable source) /// The sequence of items to rank /// A object that defines comparison semantics for the elements in the sequence /// A sequence of position integers representing the ranks of the corresponding items in the sequence - + public static IEnumerable Rank(this IEnumerable source, IComparer comparer) { return source.RankBy(x => x, comparer); @@ -56,7 +56,7 @@ public static IEnumerable Rank(this IEnumerable source, I /// The sequence of items to rank /// A key selector function which returns the value by which to rank items in the sequence /// A sequence of position integers representing the ranks of the corresponding items in the sequence - + public static IEnumerable RankBy(this IEnumerable source, Func keySelector) { return RankBy(source, keySelector, null); @@ -71,7 +71,7 @@ public static IEnumerable RankBy(this IEnumerable s /// A key selector function which returns the value by which to rank items in the sequence /// An object that defines the comparison semantics for keys used to rank items /// A sequence of position integers representing the ranks of the corresponding items in the sequence - + public static IEnumerable RankBy(this IEnumerable source, Func keySelector, IComparer comparer) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -100,4 +100,4 @@ public static IEnumerable RankBy(this IEnumerable s } } } -} \ No newline at end of file +} diff --git a/MoreLinq/Repeat.cs b/MoreLinq/Repeat.cs index ec6b8b443..59c9fb7b7 100644 --- a/MoreLinq/Repeat.cs +++ b/MoreLinq/Repeat.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -61,4 +61,4 @@ static IEnumerable RepeatImpl(IEnumerable sequence, int? count) } } } -} \ No newline at end of file +} diff --git a/MoreLinq/RightJoin.cs b/MoreLinq/RightJoin.cs index 3c4152025..3c7fa1738 100644 --- a/MoreLinq/RightJoin.cs +++ b/MoreLinq/RightJoin.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copysecond (c) 2017 Atif Aziz. All seconds reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/RunLengthEncode.cs b/MoreLinq/RunLengthEncode.cs index c22bdf954..cf9ee29fa 100644 --- a/MoreLinq/RunLengthEncode.cs +++ b/MoreLinq/RunLengthEncode.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,7 +29,7 @@ public static partial class MoreEnumerable /// The type of the elements in the sequence /// The sequence to run length encode /// A sequence of KeyValuePair{T,int} where the key is the element and the value is the occurrence count - + public static IEnumerable> RunLengthEncode(this IEnumerable sequence) { return RunLengthEncode(sequence, null); @@ -44,7 +44,7 @@ public static IEnumerable> RunLengthEncode(this IEnumera /// The sequence to run length encode /// The comparer used to identify equivalent items /// A sequence of KeyValuePair{T,int} where they key is the element and the value is the occurrence count - + public static IEnumerable> RunLengthEncode(this IEnumerable sequence, IEqualityComparer comparer) { if (sequence == null) @@ -53,7 +53,7 @@ public static IEnumerable> RunLengthEncode(this IEnumera comparer = comparer ?? EqualityComparer.Default; return _(); IEnumerable> _() { - // This implementation could also have been written using a foreach loop, + // This implementation could also have been written using a foreach loop, // but it proved to be easier to deal with edge certain cases that occur // (such as empty sequences) using an explicit iterator and a while loop. @@ -84,4 +84,4 @@ public static IEnumerable> RunLengthEncode(this IEnumera } } } -} \ No newline at end of file +} diff --git a/MoreLinq/Scan.cs b/MoreLinq/Scan.cs index 65ff10f0c..461305b24 100644 --- a/MoreLinq/Scan.cs +++ b/MoreLinq/Scan.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2009 Konrad Rudolph. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,7 +50,7 @@ static partial class MoreEnumerable /// Source sequence /// Transformation operation /// The scanned sequence - + public static IEnumerable Scan(this IEnumerable source, Func transformation) { @@ -76,8 +76,8 @@ public static IEnumerable Scan(this IEnumerable sourc } /// - /// Like except returns - /// the sequence of intermediate results as well as the final one. + /// Like except returns + /// the sequence of intermediate results as well as the final one. /// An additional parameter specifies a seed. /// /// @@ -95,7 +95,7 @@ public static IEnumerable Scan(this IEnumerable sourc /// Initial state to seed /// Transformation operation /// The scanned sequence - + public static IEnumerable Scan(this IEnumerable source, TState seed, Func transformation) { diff --git a/MoreLinq/ScanRight.cs b/MoreLinq/ScanRight.cs index 278a49599..0c4c46a54 100644 --- a/MoreLinq/ScanRight.cs +++ b/MoreLinq/ScanRight.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,7 +25,7 @@ static partial class MoreEnumerable { /// /// Peforms a right-associative scan (inclusive prefix) on a sequence of elements. - /// This operator is the right-associative version of the + /// This operator is the right-associative version of the /// LINQ operator. /// /// Type of elements in source sequence. @@ -60,7 +60,7 @@ public static IEnumerable ScanRight(this IEnumerable /// /// Peforms a right-associative scan (inclusive prefix) on a sequence of elements. /// The specified seed value is used as the initial accumulator value. - /// This operator is the right-associative version of the + /// This operator is the right-associative version of the /// LINQ operator. /// /// The type of the elements of source. diff --git a/MoreLinq/Segment.cs b/MoreLinq/Segment.cs index 92465fed3..3100d6085 100644 --- a/MoreLinq/Segment.cs +++ b/MoreLinq/Segment.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,7 +32,7 @@ public static partial class MoreEnumerable /// /// Thrown if either or are . /// - + public static IEnumerable> Segment(this IEnumerable source, Func newSegmentPredicate) { if (newSegmentPredicate == null) throw new ArgumentNullException(nameof(newSegmentPredicate)); @@ -50,7 +50,7 @@ public static IEnumerable> Segment(this IEnumerable source, /// /// Thrown if either or are . /// - + public static IEnumerable> Segment(this IEnumerable source, Func newSegmentPredicate) { if (newSegmentPredicate == null) throw new ArgumentNullException(nameof(newSegmentPredicate)); @@ -68,7 +68,7 @@ public static IEnumerable> Segment(this IEnumerable source, /// /// Thrown if either or are . /// - + public static IEnumerable> Segment(this IEnumerable source, Func newSegmentPredicate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -118,4 +118,4 @@ public static IEnumerable> Segment(this IEnumerable source, } } } -} \ No newline at end of file +} diff --git a/MoreLinq/Sequence.cs b/MoreLinq/Sequence.cs index 6b8f66321..7685248ce 100644 --- a/MoreLinq/Sequence.cs +++ b/MoreLinq/Sequence.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -67,7 +67,7 @@ public static IEnumerable Sequence(int start, int stop, int step) { long current = start; - while (step >= 0 ? stop >= current + while (step >= 0 ? stop >= current : stop <= current) { yield return (int)current; diff --git a/MoreLinq/SequenceException.cs b/MoreLinq/SequenceException.cs index 26cb242a0..07fcca571 100644 --- a/MoreLinq/SequenceException.cs +++ b/MoreLinq/SequenceException.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2009 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,7 +34,7 @@ public class SequenceException : Exception const string DefaultMessage = "Error in sequence."; /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// public SequenceException() : @@ -42,7 +42,7 @@ public SequenceException() : /// /// Initializes a new instance of the class - /// with a given error message. + /// with a given error message. /// /// A message that describes the error. @@ -68,7 +68,7 @@ public SequenceException(string message, Exception innerException) : /// The object that holds the serialized object data. /// The contextual information about the source or destination. - protected SequenceException(SerializationInfo info, StreamingContext context) : + protected SequenceException(SerializationInfo info, StreamingContext context) : base(info, context) {} #endif } diff --git a/MoreLinq/SingleOrFallback.cs b/MoreLinq/SingleOrFallback.cs index 03538d091..e706b036b 100644 --- a/MoreLinq/SingleOrFallback.cs +++ b/MoreLinq/SingleOrFallback.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/SkipUntil.cs b/MoreLinq/SkipUntil.cs index 624ae3081..7e8d0456a 100644 --- a/MoreLinq/SkipUntil.cs +++ b/MoreLinq/SkipUntil.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/Slice.cs b/MoreLinq/Slice.cs index 8d6aba5da..c0db188d8 100644 --- a/MoreLinq/Slice.cs +++ b/MoreLinq/Slice.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/SortedMerge.cs b/MoreLinq/SortedMerge.cs index bf9e00973..2da19799c 100644 --- a/MoreLinq/SortedMerge.cs +++ b/MoreLinq/SortedMerge.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,7 +31,7 @@ public static partial class MoreEnumerable /// Using SortedMerge on sequences that are not ordered or are not in the same order produces /// undefined results.
/// SortedMerge uses performs the merge in a deferred, streaming manner.
- /// + /// /// Here is an example of a merge, as well as the produced result: /// /// var s1 = new[] { 3, 7, 11 }; @@ -48,7 +48,7 @@ public static partial class MoreEnumerable /// The ordering that all sequences must already exhibit /// A variable argument array of zero or more other sequences to merge with /// A merged, order-preserving sequence containing all of the elements of the original sequences - + public static IEnumerable SortedMerge(this IEnumerable source, OrderByDirection direction, params IEnumerable[] otherSequences) { return SortedMerge(source, direction, null, otherSequences); @@ -64,7 +64,7 @@ public static IEnumerable SortedMerge(this IEnumerableThe comparer used to evaluate the relative order between elements /// A variable argument array of zero or more other sequences to merge with /// A merged, order-preserving sequence containing al of the elements of the original sequences - + public static IEnumerable SortedMerge(this IEnumerable source, OrderByDirection direction, IComparer comparer, params IEnumerable[] otherSequences) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -95,7 +95,7 @@ public static IEnumerable SortedMerge(this IEnumerableN => otherSequences.Count()+1. - + IEnumerable Impl(IEnumerable> sequences) { using (var disposables = new DisposableGroup(sequences.Select(e => e.GetEnumerator()).Acquire())) @@ -162,4 +162,4 @@ public void Dispose() => Iterators.ForEach(iter => iter.Dispose()); } } -} \ No newline at end of file +} diff --git a/MoreLinq/StartsWith.cs b/MoreLinq/StartsWith.cs index 31fa1557a..cd073fdb0 100644 --- a/MoreLinq/StartsWith.cs +++ b/MoreLinq/StartsWith.cs @@ -36,9 +36,9 @@ static partial class MoreEnumerable /// equivalent to . /// /// - /// This is the equivalent of + /// This is the equivalent of /// and it calls - /// using + /// using /// on pairs of elements at /// the same index. /// @@ -61,7 +61,7 @@ public static bool StartsWith(this IEnumerable first, IEnumerable secon /// equivalent to . /// /// - /// This is the equivalent of + /// This is the equivalent of /// and /// it calls on pairs /// of elements at the same index. diff --git a/MoreLinq/Subsets.cs b/MoreLinq/Subsets.cs index b77685161..b47359ba3 100644 --- a/MoreLinq/Subsets.cs +++ b/MoreLinq/Subsets.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,7 @@ namespace MoreLinq using System.Linq; public static partial class MoreEnumerable - { + { /// /// Returns a sequence of representing all of /// the subsets of any size that are part of the original sequence. In @@ -33,15 +33,15 @@ public static partial class MoreEnumerable /// This operator produces all of the subsets of a given sequence. Subsets are returned /// in increasing cardinality, starting with the empty set and terminating with the /// entire original sequence.
- /// Subsets are produced in a deferred, streaming manner; however, each subset is returned + /// Subsets are produced in a deferred, streaming manner; however, each subset is returned /// as a materialized list.
- /// There are 2^N subsets of a given sequence, where N => sequence.Count(). + /// There are 2^N subsets of a given sequence, where N => sequence.Count(). /// /// Sequence for which to produce subsets /// The type of the elements in the sequence /// A sequence of lists that represent the all subsets of the original sequence /// Thrown if is - + public static IEnumerable> Subsets(this IEnumerable sequence) { if (sequence == null) throw new ArgumentNullException(nameof(sequence)); @@ -87,7 +87,7 @@ public static IEnumerable> Subsets(this IEnumerable sequence) /// /// Thrown if is less than zero. /// - + public static IEnumerable> Subsets(this IEnumerable sequence, int subsetSize) { if (sequence == null) @@ -141,7 +141,7 @@ public SubsetEnumerator(IList set, int subsetSize) // precondition: subsetSize <= set.Count if (subsetSize > set.Count) throw new ArgumentOutOfRangeException(nameof(subsetSize), "Subset size must be <= sequence.Count()"); - + // initialize set arrays... _set = set; _subset = new T[subsetSize]; @@ -230,4 +230,4 @@ public IEnumerator> GetEnumerator() IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } } } -} \ No newline at end of file +} diff --git a/MoreLinq/TagFirstLast.cs b/MoreLinq/TagFirstLast.cs index 7036cfd9b..0e9f46bb1 100644 --- a/MoreLinq/TagFirstLast.cs +++ b/MoreLinq/TagFirstLast.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2013 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,15 +24,15 @@ namespace MoreLinq partial class MoreEnumerable { /// - /// Returns a sequence resulting from applying a function to each - /// element in the source sequence with additional parameters - /// indicating whether the element is the first and/or last of the + /// Returns a sequence resulting from applying a function to each + /// element in the source sequence with additional parameters + /// indicating whether the element is the first and/or last of the /// sequence. /// /// The type of the elements of . /// The type of the element of the returned sequence. /// The source sequence. - /// A function that determines how to + /// A function that determines how to /// project the each element along with its first or last tag. /// /// Returns the resulting sequence. @@ -43,18 +43,18 @@ partial class MoreEnumerable /// /// /// var numbers = new[] { 123, 456, 789 }; - /// var result = numbers.TagFirstLast((num, fst, lst) => new - /// { + /// var result = numbers.TagFirstLast((num, fst, lst) => new + /// { /// Number = num, /// IsFirst = fst, IsLast = lst /// }); /// - /// The result variable, when iterated over, will yield - /// { Number = 123, IsFirst = True, IsLast = False }, - /// { Number = 456, IsFirst = False, IsLast = False } and + /// The result variable, when iterated over, will yield + /// { Number = 123, IsFirst = True, IsLast = False }, + /// { Number = 456, IsFirst = False, IsLast = False } and /// { Number = 789, IsFirst = False, IsLast = True } in turn. /// - + public static IEnumerable TagFirstLast(this IEnumerable source, Func resultSelector) { if (source == null) throw new ArgumentNullException(nameof(source)); diff --git a/MoreLinq/TakeLast.cs b/MoreLinq/TakeLast.cs index 3bdacee0f..2ee6e2382 100644 --- a/MoreLinq/TakeLast.cs +++ b/MoreLinq/TakeLast.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2009 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,14 +23,14 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Returns a specified number of contiguous elements from the end of + /// Returns a specified number of contiguous elements from the end of /// a sequence. /// /// The type of the elements of . /// The sequence to return the last element of. /// The number of elements to return. /// - /// An that contains the specified number of + /// An that contains the specified number of /// elements from the end of the input sequence. /// /// @@ -41,7 +41,7 @@ static partial class MoreEnumerable /// int[] numbers = { 12, 34, 56, 78 }; /// IEnumerable<int> result = numbers.TakeLast(2); ///
- /// The result variable, when iterated over, will yield + /// The result variable, when iterated over, will yield /// 56 and 78 in turn. /// @@ -49,7 +49,7 @@ public static IEnumerable TakeLast(this IEnumerable s { if (source == null) throw new ArgumentNullException(nameof(source)); - return + return source is ICollection col ? col.Slice(Math.Max(0, col.Count - count), int.MaxValue) : _(); IEnumerable _() @@ -71,4 +71,4 @@ source is ICollection col } } } -} \ No newline at end of file +} diff --git a/MoreLinq/TakeUntil.cs b/MoreLinq/TakeUntil.cs index 675a362ca..5e9d44017 100644 --- a/MoreLinq/TakeUntil.cs +++ b/MoreLinq/TakeUntil.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/ToArrayByIndex.cs b/MoreLinq/ToArrayByIndex.cs index c9704b8c0..1ccf13d93 100644 --- a/MoreLinq/ToArrayByIndex.cs +++ b/MoreLinq/ToArrayByIndex.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Atif Aziz. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/ToDataTable.cs b/MoreLinq/ToDataTable.cs index 24d7c1b02..e77f6db01 100644 --- a/MoreLinq/ToDataTable.cs +++ b/MoreLinq/ToDataTable.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Johannes Rudolph. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/Trace.cs b/MoreLinq/Trace.cs index c311efb59..8fac03eda 100644 --- a/MoreLinq/Trace.cs +++ b/MoreLinq/Trace.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,7 +32,7 @@ static partial class MoreEnumerable /// Return the source sequence unmodified. /// /// - /// This a pass-through operator that uses deferred execution and + /// This a pass-through operator that uses deferred execution and /// streams the results. /// @@ -55,7 +55,7 @@ public static IEnumerable Trace(this IEnumerable sour /// Return the source sequence unmodified. /// /// - /// This a pass-through operator that uses deferred execution and + /// This a pass-through operator that uses deferred execution and /// streams the results. /// @@ -63,7 +63,7 @@ public static IEnumerable Trace(this IEnumerable sour { if (source == null) throw new ArgumentNullException(nameof(source)); - return TraceImpl(source, + return TraceImpl(source, string.IsNullOrEmpty(format) ? (Func) (x => x == null ? string.Empty : x.ToString()) : (x => string.Format(format, x))); @@ -80,7 +80,7 @@ public static IEnumerable Trace(this IEnumerable sour /// Return the source sequence unmodified. /// /// - /// This a pass-through operator that uses deferred execution and + /// This a pass-through operator that uses deferred execution and /// streams the results. /// diff --git a/MoreLinq/Traverse.cs b/MoreLinq/Traverse.cs index 43a3e3f06..37bfb164a 100644 --- a/MoreLinq/Traverse.cs +++ b/MoreLinq/Traverse.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2016 Felipe Sateler. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/MoreLinq/Unfold.cs b/MoreLinq/Unfold.cs index 02260e5bf..c61ef9745 100644 --- a/MoreLinq/Unfold.cs +++ b/MoreLinq/Unfold.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2017 Leandro F. Vieira (leandromoh). All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,7 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Returns a sequence generated by applying a state to the generator function, + /// Returns a sequence generated by applying a state to the generator function, /// and from its result, determines if the sequence should have a next element, its value, /// and the next state in the recursive call. /// diff --git a/MoreLinq/Windowed.cs b/MoreLinq/Windowed.cs index 8c8d84811..c58ed56c7 100644 --- a/MoreLinq/Windowed.cs +++ b/MoreLinq/Windowed.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2010 Leopold Bushkin. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,7 +33,7 @@ public static partial class MoreEnumerable /// The sequence to evaluate a sliding window over /// The size (number of elements) in each window /// A series of sequences representing each sliding window subsequence - + public static IEnumerable> Windowed(this IEnumerable source, int size) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -58,7 +58,7 @@ public static IEnumerable> Windowed(this IEnumerab // generate the next window by shifting forward by one item while (iter.MoveNext()) { - // NOTE: If we used a circular queue rather than a list, + // NOTE: If we used a circular queue rather than a list, // we could make this quite a bit more efficient. // Sadly the BCL does not offer such a collection. var newWindow = new TSource[size]; @@ -71,4 +71,4 @@ public static IEnumerable> Windowed(this IEnumerab } } } -} \ No newline at end of file +} diff --git a/MoreLinq/Zip.stub.cs b/MoreLinq/Zip.stub.cs index a6616c06e..716f4e5b3 100644 --- a/MoreLinq/Zip.stub.cs +++ b/MoreLinq/Zip.stub.cs @@ -1,4 +1,4 @@ -// An implementation of Zip for sequences is included in Microsoft .NET -// Framework starting with version 4.0 and is identical to Zip in MoreLINQ. +// An implementation of Zip for sequences is included in Microsoft .NET +// Framework starting with version 4.0 and is identical to Zip in MoreLINQ. // For more information on Zip, see the following reference on MSDN: // http://msdn.microsoft.com/en-us/library/dd267698.aspx diff --git a/MoreLinq/ZipShortest.cs b/MoreLinq/ZipShortest.cs index 4149c448d..f4e50e683 100644 --- a/MoreLinq/ZipShortest.cs +++ b/MoreLinq/ZipShortest.cs @@ -1,13 +1,13 @@ #region License and Terms // MoreLINQ - Extensions to LINQ to Objects // Copyright (c) 2008 Jonathan Skeet. All rights reserved. -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,11 +23,11 @@ namespace MoreLinq static partial class MoreEnumerable { /// - /// Returns a projection of tuples, where each tuple contains the N-th element + /// Returns a projection of tuples, where each tuple contains the N-th element /// from each of the argument sequences. /// /// - /// If the input sequences are of different lengths, the result sequence + /// If the input sequences are of different lengths, the result sequence /// is terminated as soon as the shortest input sequence is exhausted. /// This operator uses deferred execution and streams its results. /// @@ -38,7 +38,7 @@ static partial class MoreEnumerable /// var chars = new[] { 'a', 'b', 'c', 'd', 'e' }; /// var zipped = numbers.ZipShortest(letters, chars, (n, l, c) => c + n + l); /// - /// The zipped variable, when iterated over, will yield + /// The zipped variable, when iterated over, will yield /// "98A", "100B", "102C", in turn. /// /// Type of elements in first sequence @@ -50,7 +50,7 @@ static partial class MoreEnumerable /// Third sequence /// Function to apply to each triplet of elements /// A projection of tuples, where each tuple contains the N-th element from each of the argument sequences. - + public static IEnumerable ZipShortest(this IEnumerable first, IEnumerable second, IEnumerable third, Func resultSelector) { @@ -63,11 +63,11 @@ public static IEnumerable ZipShortest(this IEnumer } /// - /// Returns a projection of tuples, where each tuple contains the N-th element + /// Returns a projection of tuples, where each tuple contains the N-th element /// from each of the argument sequences. /// /// - /// If the input sequences are of different lengths, the result sequence + /// If the input sequences are of different lengths, the result sequence /// is terminated as soon as the shortest input sequence is exhausted. /// This operator uses deferred execution and streams its results. /// @@ -79,7 +79,7 @@ public static IEnumerable ZipShortest(this IEnumer /// var flags = new[] { true, false }; /// var zipped = numbers.ZipShortest(letters, chars, flags (n, l, c, f) => n + l + c + f); /// - /// The zipped variable, when iterated over, will yield + /// The zipped variable, when iterated over, will yield /// "1AaTrue", "2BbFalse" in turn. /// /// Type of elements in first sequence @@ -93,7 +93,7 @@ public static IEnumerable ZipShortest(this IEnumer /// Fourth sequence /// Function to apply to each quadruplet of elements /// A projection of tuples, where each tuple contains the N-th element from each of the argument sequences. - + public static IEnumerable ZipShortest(this IEnumerable first, IEnumerable second, IEnumerable third, IEnumerable fourth, Func resultSelector) { @@ -107,11 +107,11 @@ public static IEnumerable ZipShortest(this IEn } /// - /// Returns a projection of tuples, where each tuple contains the N-th element + /// Returns a projection of tuples, where each tuple contains the N-th element /// from each of the argument sequences. /// /// - /// If the two input sequences are of different lengths, the result sequence + /// If the two input sequences are of different lengths, the result sequence /// is terminated as soon as the shortest input sequence is exhausted. /// This operator uses deferred execution and streams its results. /// @@ -130,7 +130,7 @@ public static IEnumerable ZipShortest(this IEn /// Second sequence /// Function to apply to each pair of elements /// A projection of tuples, where each tuple contains the N-th element from each of the argument sequences - + public static IEnumerable ZipShortest(this IEnumerable first, IEnumerable second, Func resultSelector) { @@ -142,8 +142,8 @@ public static IEnumerable ZipShortest(this IE } static IEnumerable ZipImpl( - IEnumerable s1, IEnumerable s2, - IEnumerable s3, IEnumerable s4, + IEnumerable s1, IEnumerable s2, + IEnumerable s3, IEnumerable s4, Func resultSelector) { using (var e1 = s1.GetEnumerator()) @@ -155,7 +155,7 @@ static IEnumerable ZipImpl( { if (e2.MoveNext() && (e3 == null || e3.MoveNext()) && (e4 == null || e4.MoveNext())) - { + { yield return resultSelector(e1.Current, e2.Current, e3 != null ? e3.Current : default(T3), e4 != null ? e4.Current : default(T4)); diff --git a/README.md b/README.md index e613bc6eb..6b3a1a93d 100644 --- a/README.md +++ b/README.md @@ -42,12 +42,12 @@ This method has 2 overloads. ### AtLeast -Determines whether or not the number of elements in the sequence is greater +Determines whether or not the number of elements in the sequence is greater than or equal to the given integer. ### AtMost -Determines whether or not the number of elements in the sequence is lesser +Determines whether or not the number of elements in the sequence is lesser than or equal to the given integer. ### Batch @@ -80,7 +80,7 @@ and doesn't store any data during execution ### CountBetween -Determines whether or not the number of elements in the sequence is between an +Determines whether or not the number of elements in the sequence is between an inclusive range of minimum and maximum integers. ### CountBy @@ -115,7 +115,7 @@ This method has 3 overloads. ### Exactly -Determines whether or not the number of elements in the sequence is equals +Determines whether or not the number of elements in the sequence is equals to the given integer. ### ExceptBy @@ -550,8 +550,8 @@ This method has 3 overloads. ### Unfold -Returns a sequence generated by applying a state to the generator function, -and from its result, determines if the sequence should have a next element and +Returns a sequence generated by applying a state to the generator function, +and from its result, determines if the sequence should have a next element and its value, and the next state in the recursive call. This method has 2 overloads. diff --git a/appveyor.yml b/appveyor.yml index 48f46955c..758b7d562 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,6 +6,12 @@ skip_commits: - '*.txt' - '.editorconfig' - lic/* +install: +- npm install -g eclint +- git rm .editorconfig +- eclint check -n "**/*.{cs,tt,cmd,sh,md,txt,yml}" +- eclint check -w "**/*.{cs,tt,cmd,sh,md,txt,yml,json,sln,csproj,shfbproj}" +- git reset --hard build_script: - ps: >- grep --extended-regexp '^[[:space:]]*using[[:space:]]+System\.Linq;' (dir MoreLinq.Test\*Test.cs) @@ -37,4 +43,4 @@ notifications: - morelinq-roll@googlegroups.com on_build_success: true on_build_failure: true - on_build_status_changed: false \ No newline at end of file + on_build_status_changed: false diff --git a/msbuild.sh b/msbuild.sh index 825c4ce2d..1ef5aaf5c 100755 --- a/msbuild.sh +++ b/msbuild.sh @@ -18,4 +18,4 @@ export MSBuildExtensionsPath=$SDK_DIR export CscToolExe=$SDK_DIR/Roslyn/RunCsc.sh export MSBuildSDKsPath=$SDK_DIR/Sdks -msbuild "$@" \ No newline at end of file +msbuild "$@" diff --git a/test.sh b/test.sh index 8326be334..6ea69374e 100755 --- a/test.sh +++ b/test.sh @@ -11,6 +11,6 @@ if [[ -z `which mono 2>/dev/null` ]]; then echo>&2 NOTE! Mono does not appear to be installed so unit tests echo>&2 against the Mono runtime will be skipped. else - mono MoreLinq.Test/bin/Debug/net451/MoreLinq.Test.exe - mono MoreLinq.Test/bin/Release/net451/MoreLinq.Test.exe + mono MoreLinq.Test/bin/Debug/net451/MoreLinq.Test.exe + mono MoreLinq.Test/bin/Release/net451/MoreLinq.Test.exe fi