Skip to content

Commit

Permalink
Update docs with examples from linqpad scripts (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceroypenguin authored Nov 23, 2023
1 parent a3d4552 commit 13d70fc
Show file tree
Hide file tree
Showing 114 changed files with 2,288 additions and 0 deletions.
98 changes: 98 additions & 0 deletions Docs/SuperLinq.Docs/apidoc/SuperLinq.SuperEnumerable.Aggregate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
uid: SuperLinq.SuperEnumerable.Aggregate``10(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},``4,System.Func{``4,``0,``4},``5,System.Func{``5,``0,``5},``6,System.Func{``6,``0,``6},``7,System.Func{``7,``0,``7},``8,System.Func{``8,``0,``8},System.Func{``1,``2,``3,``4,``5,``6,``7,``8,``9})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``3(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},System.Func{``1,``2})>.

This operator uses multiple seeds and aggregates and passes the final values to <code class="paramref">resultSelector</code>.
---
uid: SuperLinq.SuperEnumerable.Aggregate``3(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``2(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1})>.

This operator uses multiple seeds and aggregates and returns the final values in a <xref href="System.ValueTuple%602" data-throw-if-not-resolved="false"></xref>
---
uid: SuperLinq.SuperEnumerable.Aggregate``4(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},System.Func{``1,``2,``3})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``3(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},System.Func{``1,``2})>.

This operator uses multiple seeds and aggregates and passes the final values to <code class="paramref">resultSelector</code>.
---
uid: SuperLinq.SuperEnumerable.Aggregate``4(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``2(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1})>.

This operator uses multiple seeds and aggregates and returns the final values in a <xref href="System.ValueTuple%603" data-throw-if-not-resolved="false"></xref>
---
uid: SuperLinq.SuperEnumerable.Aggregate``5(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},System.Func{``1,``2,``3,``4})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``3(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},System.Func{``1,``2})>.

This operator uses multiple seeds and aggregates and passes the final values to <code class="paramref">resultSelector</code>.
---
uid: SuperLinq.SuperEnumerable.Aggregate``5(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},``4,System.Func{``4,``0,``4})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``2(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1})>.

This operator uses multiple seeds and aggregates and returns the final values in a <xref href="System.ValueTuple%604" data-throw-if-not-resolved="false"></xref>
---
uid: SuperLinq.SuperEnumerable.Aggregate``6(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},``4,System.Func{``4,``0,``4},System.Func{``1,``2,``3,``4,``5})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``3(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},System.Func{``1,``2})>.

This operator uses multiple seeds and aggregates and passes the final values to <code class="paramref">resultSelector</code>.
---
uid: SuperLinq.SuperEnumerable.Aggregate``6(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},``4,System.Func{``4,``0,``4},``5,System.Func{``5,``0,``5})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``2(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1})>.

This operator uses multiple seeds and aggregates and returns the final values in a <xref href="System.ValueTuple%605" data-throw-if-not-resolved="false"></xref>
---
uid: SuperLinq.SuperEnumerable.Aggregate``7(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},``4,System.Func{``4,``0,``4},``5,System.Func{``5,``0,``5},System.Func{``1,``2,``3,``4,``5,``6})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``3(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},System.Func{``1,``2})>.

This operator uses multiple seeds and aggregates and passes the final values to <code class="paramref">resultSelector</code>.
---
uid: SuperLinq.SuperEnumerable.Aggregate``7(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},``4,System.Func{``4,``0,``4},``5,System.Func{``5,``0,``5},``6,System.Func{``6,``0,``6})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``2(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1})>.

This operator uses multiple seeds and aggregates and returns the final values in a <xref href="System.ValueTuple%606" data-throw-if-not-resolved="false"></xref>
---
uid: SuperLinq.SuperEnumerable.Aggregate``8(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},``4,System.Func{``4,``0,``4},``5,System.Func{``5,``0,``5},``6,System.Func{``6,``0,``6},System.Func{``1,``2,``3,``4,``5,``6,``7})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``3(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},System.Func{``1,``2})>.

This operator uses multiple seeds and aggregates and passes the final values to <code class="paramref">resultSelector</code>.
---
uid: SuperLinq.SuperEnumerable.Aggregate``8(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},``4,System.Func{``4,``0,``4},``5,System.Func{``5,``0,``5},``6,System.Func{``6,``0,``6},``7,System.Func{``7,``0,``7})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``2(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1})>.

This operator uses multiple seeds and aggregates and returns the final values in a <xref href="System.ValueTuple%607" data-throw-if-not-resolved="false"></xref>
---
uid: SuperLinq.SuperEnumerable.Aggregate``9(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},``4,System.Func{``4,``0,``4},``5,System.Func{``5,``0,``5},``6,System.Func{``6,``0,``6},``7,System.Func{``7,``0,``7},System.Func{``1,``2,``3,``4,``5,``6,``7,``8})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``3(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},System.Func{``1,``2})>.

This operator uses multiple seeds and aggregates and passes the final values to <code class="paramref">resultSelector</code>.
---
uid: SuperLinq.SuperEnumerable.Aggregate``9(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1},``2,System.Func{``2,``0,``2},``3,System.Func{``3,``0,``3},``4,System.Func{``4,``0,``4},``5,System.Func{``5,``0,``5},``6,System.Func{``6,``0,``6},``7,System.Func{``7,``0,``7},``8,System.Func{``8,``0,``8})
example: [*content]
---
For an example using a single seed and aggregate, please see <xref:System.Linq.Enumerable.Aggregate``2(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``1,``0,``1})>.

This operator uses multiple seeds and aggregates and returns the final values in a <xref href="System.ValueTuple%608" data-throw-if-not-resolved="false"></xref>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
uid: SuperLinq.SuperEnumerable.AggregateBy``3(System.Collections.Generic.IEnumerable{``0},System.Func{``0,``1},``2,System.Func{``2,``0,``2},System.Collections.Generic.IEqualityComparer{``1})
example: [*content]
---
The following code example demonstrates how to aggregate values by key in a sequence, using `AggregateBy`.
[!code-csharp[](SuperLinq/AggregateBy/AggregateBy1.linq#L6-)]

---
uid: SuperLinq.SuperEnumerable.AggregateBy``3(System.Collections.Generic.IEnumerable{``0},System.Func{``0,``1},System.Func{``1,``2},System.Func{``2,``0,``2},System.Collections.Generic.IEqualityComparer{``1})
example: [*content]
---
The following code example demonstrates how to aggregate values by key in a sequence, using `AggregateBy`.
[!code-csharp[](SuperLinq/AggregateBy/AggregateBy2.linq#L6-)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
uid: SuperLinq.SuperEnumerable.AggregateRight``1(System.Collections.Generic.IEnumerable{``0},System.Func{``0,``0,``0})
example: [*content]
---
The following code example demonstrates how to collect numbers into a string using `AggregateRight`.
[!code-csharp[](SuperLinq/AggregateRight/AggregateRight1.linq#L6-)]
---
uid: SuperLinq.SuperEnumerable.AggregateRight``2(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``0,``1,``1})
example: [*content]
---
The following code example demonstrates how to collect numbers into a string using `AggregateRight`.
[!code-csharp[](SuperLinq/AggregateRight/AggregateRight2.linq#L6-)]
---
uid: SuperLinq.SuperEnumerable.AggregateRight``3(System.Collections.Generic.IEnumerable{``0},``1,System.Func{``0,``1,``1},System.Func{``1,``2})
example: [*content]
---
The following code example demonstrates how to collect numbers into a string using `AggregateRight`.
[!code-csharp[](SuperLinq/AggregateRight/AggregateRight3.linq#L6-)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
uid: SuperLinq.SuperEnumerable.AssertCount``1(System.Collections.Generic.IEnumerable{``0},System.Int32)
example: [*content]
---
The following code example demonstrates how to validate the length of a sequence using `AssertCount`.
[!code-csharp[](SuperLinq/AssertCount/AssertCount.linq#L6-)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
uid: SuperLinq.SuperEnumerable.AtLeast``1(System.Collections.Generic.IEnumerable{``0},System.Int32)
example: [*content]
---
The following code example demonstrates how to check that a sequence has a minimum size using `AtLeast`.
[!code-csharp[](SuperLinq/AtLeast/AtLeast.linq#L6-)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
uid: SuperLinq.SuperEnumerable.AtMost``1(System.Collections.Generic.IEnumerable{``0},System.Int32)
example: [*content]
---
The following code example demonstrates how to check that a sequence has a maximum size using `AtMost`.
[!code-csharp[](SuperLinq/AtMost/AtMost.linq#L6-)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
uid: SuperLinq.SuperEnumerable.Backsert``1(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``0},System.Int32)
example: [*content]
---
> [!NOTE]
> `Backsert` has been deprecated in favor of `Insert`. Please see [here](xref:SuperLinq.SuperEnumerable.Insert``1(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``0},System.Index)) for documentation on the equivalent method.
The following code example demonstrates how to insert one sequence into another, using `Backsert`.
[!code-csharp[](SuperLinq/Backsert/Backsert.linq#L6-)]
24 changes: 24 additions & 0 deletions Docs/SuperLinq.Docs/apidoc/SuperLinq.SuperEnumerable.Batch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
uid: SuperLinq.SuperEnumerable.Batch``1(System.Collections.Generic.IEnumerable{``0},System.Int32)
example: [*content]
---
The following code example demonstrates how to break a sequence into chunks of a specific size, using `Batch`.
[!code-csharp[](SuperLinq/Batch/Batch1.linq#L6-)]
---
uid: SuperLinq.SuperEnumerable.Batch``2(System.Collections.Generic.IEnumerable{``0},System.Int32,System.Func{System.Collections.Generic.IReadOnlyList{``0},``1})
example: [*content]
---
The following code example demonstrates how to break a sequence into chunks of a specific size, using `Batch`.
[!code-csharp[](SuperLinq/Batch/Batch2.linq#L6-)]
---
uid: SuperLinq.SuperEnumerable.Batch``2(System.Collections.Generic.IEnumerable{``0},``0[],System.Func{System.Collections.Generic.IReadOnlyList{``0},``1})
example: [*content]
---
The following code example demonstrates how to break a sequence into chunks of a specific size, using `Batch`.
[!code-csharp[](SuperLinq/Batch/Batch3.linq#L6-)]
---
uid: SuperLinq.SuperEnumerable.Batch``2(System.Collections.Generic.IEnumerable{``0},``0[],System.Int32,System.Func{System.Collections.Generic.IReadOnlyList{``0},``1})
example: [*content]
---
The following code example demonstrates how to break a sequence into chunks of a specific size, using `Batch`.
[!code-csharp[](SuperLinq/Batch/Batch4.linq#L6-)]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
uid: SuperLinq.SuperEnumerable.BindByIndex``1(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{System.Int32})
example: [*content]
---
The following code example demonstrates how to select elements from a sequence by index, using `BindByIndex`.
[!code-csharp[](SuperLinq/BindByIndex/BindByIndex1.linq#L6-)]

---
uid: SuperLinq.SuperEnumerable.BindByIndex``2(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{System.Int32},System.Func{``0,System.Int32,``1},System.Func{System.Int32,``1})
example: [*content]
---
The following code example demonstrates how to select elements from a sequence by index, using `BindByIndex`.
[!code-csharp[](SuperLinq/BindByIndex/BindByIndex2.linq#L6-)]

13 changes: 13 additions & 0 deletions Docs/SuperLinq.Docs/apidoc/SuperLinq.SuperEnumerable.Buffer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
uid: SuperLinq.SuperEnumerable.Buffer``1(System.Collections.Generic.IEnumerable{``0},System.Int32)
example: [*content]
---
The following code example demonstrates how to buffer a sequence using `Buffer`.
[!code-csharp[](SuperLinq/Buffer/Buffer1.linq#L6-)]

---
uid: SuperLinq.SuperEnumerable.Buffer``1(System.Collections.Generic.IEnumerable{``0},System.Int32,System.Int32)
example: [*content]
---
The following code example demonstrates how to buffer a sequence using `Buffer`.
[!code-csharp[](SuperLinq/Buffer/Buffer2.linq#L6-)]
Loading

0 comments on commit 13d70fc

Please sign in to comment.