Skip to content

Commit

Permalink
Fix method signature format and clarify functional complements (#6883)
Browse files Browse the repository at this point in the history
* Update GC.xml

Updated according to issue #6790 to comply with official formatting standards

* Update Enumerable.xml

Specify that Take and Skip are complements when the sequences are unrepeatable

* Updated wording according to feedback

Co-authored-by: Steve Berdy <[email protected]>
Co-authored-by: Steve Berdy <[email protected]>
Co-authored-by: Andy De George <[email protected]>
  • Loading branch information
4 people authored Jul 13, 2021
1 parent 7566940 commit 87abb6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions xml/System.Linq/Enumerable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9902,7 +9902,7 @@ Only unique elements are returned.

If `source` contains fewer than `count` elements, an empty <xref:System.Collections.Generic.IEnumerable%601> is returned. If `count` is less than or equal to zero, all elements of `source` are yielded.

The <xref:System.Linq.Enumerable.Take%2A> and <xref:System.Linq.Enumerable.Skip%2A> methods are functional complements. Given a sequence `coll` and an integer `n`, concatenating the results of `coll.Take(n)` and `coll.Skip(n)` yields the same sequence as `coll`.
The <xref:System.Linq.Enumerable.Take%2A> and <xref:System.Linq.Enumerable.Skip%2A> methods are functional complements. Given a collection sequence `coll` and an integer `n`, concatenating the results of `coll.Take(n)` and `coll.Skip(n)` yields the same sequence as `coll`.

In Visual Basic query expression syntax, a `Skip` clause translates to an invocation of <xref:System.Linq.Enumerable.Skip%2A>.

Expand Down Expand Up @@ -10039,7 +10039,7 @@ If `count` is not a positive number, this method returns an identical copy of th

If `predicate` returns `true` for all elements in the sequence, an empty <xref:System.Collections.Generic.IEnumerable%601> is returned.

The <xref:System.Linq.Enumerable.TakeWhile%2A> and <xref:System.Linq.Enumerable.SkipWhile%2A> methods are functional complements. Given a sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`.
The <xref:System.Linq.Enumerable.TakeWhile%2A> and <xref:System.Linq.Enumerable.SkipWhile%2A> methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`.

In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of <xref:System.Linq.Enumerable.SkipWhile%2A>.

Expand Down Expand Up @@ -10115,7 +10115,7 @@ If `count` is not a positive number, this method returns an identical copy of th

The first argument of `predicate` represents the element to test. The second argument represents the zero-based index of the element within `source`.

The <xref:System.Linq.Enumerable.TakeWhile%2A> and <xref:System.Linq.Enumerable.SkipWhile%2A> methods are functional complements. Given a sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`.
The <xref:System.Linq.Enumerable.TakeWhile%2A> and <xref:System.Linq.Enumerable.SkipWhile%2A> methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`.

In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of <xref:System.Linq.Enumerable.SkipWhile%2A>.

Expand Down Expand Up @@ -11506,7 +11506,7 @@ If `count` is not a positive number, this method returns an identical copy of th

If `count` is less than or equal to zero, `source` is not enumerated and an empty <xref:System.Collections.Generic.IEnumerable%601> is returned.

The <xref:System.Linq.Enumerable.Take%2A> and <xref:System.Linq.Enumerable.Skip%2A> methods are functional complements. Given a sequence `coll` and an integer `n`, concatenating the results of `coll.Take(n)` and `coll.Skip(n)` yields the same sequence as `coll`.
The <xref:System.Linq.Enumerable.Take%2A> and <xref:System.Linq.Enumerable.Skip%2A> methods are functional complements. Given a collection sequence `coll` and an integer `n`, concatenating the results of `coll.Take(n)` and `coll.Skip(n)` yields the same sequence as `coll`.

In Visual Basic query expression syntax, a `Take` clause translates to an invocation of <xref:System.Linq.Enumerable.Take%2A>.

Expand Down Expand Up @@ -11678,7 +11678,7 @@ If `count` is not a positive number, this method returns an empty enumerable col

The <xref:System.Linq.Enumerable.TakeWhile%60%601%28System.Collections.Generic.IEnumerable%7B%60%600%7D%2CSystem.Func%7B%60%600%2CSystem.Boolean%7D%29> method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements.

The <xref:System.Linq.Enumerable.TakeWhile%2A> and <xref:System.Linq.Enumerable.SkipWhile%2A> methods are functional complements. Given a sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`.
The <xref:System.Linq.Enumerable.TakeWhile%2A> and <xref:System.Linq.Enumerable.SkipWhile%2A> methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`.

In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of <xref:System.Linq.Enumerable.TakeWhile%2A>.

Expand Down Expand Up @@ -11752,7 +11752,7 @@ If `count` is not a positive number, this method returns an empty enumerable col

The first argument of `predicate` represents the element to test. The second argument represents the zero-based index of the element within `source`.

The <xref:System.Linq.Enumerable.TakeWhile%2A> and <xref:System.Linq.Enumerable.SkipWhile%2A> methods are functional complements. Given a sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`.
The <xref:System.Linq.Enumerable.TakeWhile%2A> and <xref:System.Linq.Enumerable.SkipWhile%2A> methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`.

In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of <xref:System.Linq.Enumerable.TakeWhile%2A>.

Expand Down
2 changes: 1 addition & 1 deletion xml/System/GC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
</Docs>
<Members>
<Member MemberName="AddMemoryPressure">
<MemberSignature Language="C#" Value="public static void AddMemoryPressure (long bytesAllocated);" />
<MemberSignature Language="C#" Value="public static void AddMemoryPressure(long bytesAllocated);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void AddMemoryPressure(int64 bytesAllocated) cil managed" />
<MemberSignature Language="DocId" Value="M:System.GC.AddMemoryPressure(System.Int64)" />
<MemberSignature Language="VB.NET" Value="Public Shared Sub AddMemoryPressure (bytesAllocated As Long)" />
Expand Down

0 comments on commit 87abb6d

Please sign in to comment.