Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 2191763

Browse files
grant-dahsonkhan
authored andcommitted
Ref Assembly and Units for Span.Trim (#35576)
* Units for Trim * Add ref assembly * Bug * Add char units * Bugs * CR fixes - 1 * CR fixes - 2 * CR fixes - 3 * CR fixes - 4 * CR fixes - 5 * Revert formatting * unfo formatting * Get MemberData working * Normalize ref * Manual revert changes * CR fixes * Undo code cleanup * Fixes * Update ref * Update ref * Update ref * Move memory tests * Revert StringTests * Remove redundant unit code * Add missing refs * Bug * dotnet msbuild /t:GenerateReferenceSource * Revert unintended changes * POC : Check if fix works * Fix units * Revert temp test * Update ApiCompatBaseline.uapaot.txt
1 parent ec652c1 commit 2191763

File tree

5 files changed

+881
-1
lines changed

5 files changed

+881
-1
lines changed

src/System.Memory/ref/System.Memory.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,48 @@ public static void Reverse<T>(this System.Span<T> span) { }
9292
public static int ToLowerInvariant(this System.ReadOnlySpan<char> source, System.Span<char> destination) { throw null; }
9393
public static int ToUpper(this System.ReadOnlySpan<char> source, System.Span<char> destination, System.Globalization.CultureInfo culture) { throw null; }
9494
public static int ToUpperInvariant(this System.ReadOnlySpan<char> source, System.Span<char> destination) { throw null; }
95+
public static System.Memory<char> Trim(this System.Memory<char> memory) { throw null; }
96+
public static System.ReadOnlyMemory<char> Trim(this System.ReadOnlyMemory<char> memory) { throw null; }
9597
public static System.ReadOnlySpan<char> Trim(this System.ReadOnlySpan<char> span) { throw null; }
9698
public static System.ReadOnlySpan<char> Trim(this System.ReadOnlySpan<char> span, char trimChar) { throw null; }
9799
public static System.ReadOnlySpan<char> Trim(this System.ReadOnlySpan<char> span, System.ReadOnlySpan<char> trimChars) { throw null; }
100+
public static System.Span<char> Trim(this System.Span<char> span) { throw null; }
101+
public static System.Memory<char> TrimEnd(this System.Memory<char> memory) { throw null; }
102+
public static System.ReadOnlyMemory<char> TrimEnd(this System.ReadOnlyMemory<char> memory) { throw null; }
98103
public static System.ReadOnlySpan<char> TrimEnd(this System.ReadOnlySpan<char> span) { throw null; }
99104
public static System.ReadOnlySpan<char> TrimEnd(this System.ReadOnlySpan<char> span, char trimChar) { throw null; }
100105
public static System.ReadOnlySpan<char> TrimEnd(this System.ReadOnlySpan<char> span, System.ReadOnlySpan<char> trimChars) { throw null; }
106+
public static System.Span<char> TrimEnd(this System.Span<char> span) { throw null; }
107+
public static System.Memory<T> TrimEnd<T>(this System.Memory<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
108+
public static System.Memory<T> TrimEnd<T>(this System.Memory<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
109+
public static System.ReadOnlyMemory<T> TrimEnd<T>(this System.ReadOnlyMemory<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
110+
public static System.ReadOnlyMemory<T> TrimEnd<T>(this System.ReadOnlyMemory<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
111+
public static System.ReadOnlySpan<T> TrimEnd<T>(this System.ReadOnlySpan<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
112+
public static System.ReadOnlySpan<T> TrimEnd<T>(this System.ReadOnlySpan<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
113+
public static System.Span<T> TrimEnd<T>(this System.Span<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
114+
public static System.Span<T> TrimEnd<T>(this System.Span<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
115+
public static System.Memory<char> TrimStart(this System.Memory<char> memory) { throw null; }
116+
public static System.ReadOnlyMemory<char> TrimStart(this System.ReadOnlyMemory<char> memory) { throw null; }
101117
public static System.ReadOnlySpan<char> TrimStart(this System.ReadOnlySpan<char> span) { throw null; }
102118
public static System.ReadOnlySpan<char> TrimStart(this System.ReadOnlySpan<char> span, char trimChar) { throw null; }
103119
public static System.ReadOnlySpan<char> TrimStart(this System.ReadOnlySpan<char> span, System.ReadOnlySpan<char> trimChars) { throw null; }
120+
public static System.Span<char> TrimStart(this System.Span<char> span) { throw null; }
121+
public static System.Memory<T> TrimStart<T>(this System.Memory<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
122+
public static System.Memory<T> TrimStart<T>(this System.Memory<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
123+
public static System.ReadOnlyMemory<T> TrimStart<T>(this System.ReadOnlyMemory<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
124+
public static System.ReadOnlyMemory<T> TrimStart<T>(this System.ReadOnlyMemory<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
125+
public static System.ReadOnlySpan<T> TrimStart<T>(this System.ReadOnlySpan<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
126+
public static System.ReadOnlySpan<T> TrimStart<T>(this System.ReadOnlySpan<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
127+
public static System.Span<T> TrimStart<T>(this System.Span<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
128+
public static System.Span<T> TrimStart<T>(this System.Span<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
129+
public static System.Memory<T> Trim<T>(this System.Memory<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
130+
public static System.Memory<T> Trim<T>(this System.Memory<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
131+
public static System.ReadOnlyMemory<T> Trim<T>(this System.ReadOnlyMemory<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
132+
public static System.ReadOnlyMemory<T> Trim<T>(this System.ReadOnlyMemory<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
133+
public static System.ReadOnlySpan<T> Trim<T>(this System.ReadOnlySpan<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
134+
public static System.ReadOnlySpan<T> Trim<T>(this System.ReadOnlySpan<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
135+
public static System.Span<T> Trim<T>(this System.Span<T> memory, System.ReadOnlySpan<T> trimElements) where T : System.IEquatable<T> { throw null; }
136+
public static System.Span<T> Trim<T>(this System.Span<T> memory, T trimElement) where T : System.IEquatable<T> { throw null; }
104137
}
105138
public readonly partial struct SequencePosition : System.IEquatable<System.SequencePosition>
106139
{
Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
11
Compat issues with assembly System.Memory:
22
CannotRemoveBaseTypeOrInterface : Type 'System.Memory<T>' does not implement interface 'System.IEquatable<System.Memory<T>>' in the implementation but it does in the contract.
33
CannotRemoveBaseTypeOrInterface : Type 'System.ReadOnlyMemory<T>' does not implement interface 'System.IEquatable<System.ReadOnlyMemory<T>>' in the implementation but it does in the contract.
4-
Total issues: 2
4+
MembersMustExist : Member 'System.MemoryExtensions.Trim(System.Memory<System.Char>)' does not exist in the implementation but it does exist in the contract.
5+
MembersMustExist : Member 'System.MemoryExtensions.Trim(System.ReadOnlyMemory<System.Char>)' does not exist in the implementation but it does exist in the contract.
6+
MembersMustExist : Member 'System.MemoryExtensions.Trim(System.Span<System.Char>)' does not exist in the implementation but it does exist in the contract.
7+
MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.Memory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
8+
MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.Memory<T>, T)' does not exist in the implementation but it does exist in the contract.
9+
MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.ReadOnlyMemory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
10+
MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.ReadOnlyMemory<T>, T)' does not exist in the implementation but it does exist in the contract.
11+
MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.ReadOnlySpan<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
12+
MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.ReadOnlySpan<T>, T)' does not exist in the implementation but it does exist in the contract.
13+
MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.Span<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
14+
MembersMustExist : Member 'System.MemoryExtensions.Trim<T>(System.Span<T>, T)' does not exist in the implementation but it does exist in the contract.
15+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.Memory<System.Char>)' does not exist in the implementation but it does exist in the contract.
16+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.ReadOnlyMemory<System.Char>)' does not exist in the implementation but it does exist in the contract.
17+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd(System.Span<System.Char>)' does not exist in the implementation but it does exist in the contract.
18+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.Memory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
19+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.Memory<T>, T)' does not exist in the implementation but it does exist in the contract.
20+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.ReadOnlyMemory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
21+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.ReadOnlyMemory<T>, T)' does not exist in the implementation but it does exist in the contract.
22+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.ReadOnlySpan<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
23+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.ReadOnlySpan<T>, T)' does not exist in the implementation but it does exist in the contract.
24+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.Span<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
25+
MembersMustExist : Member 'System.MemoryExtensions.TrimEnd<T>(System.Span<T>, T)' does not exist in the implementation but it does exist in the contract.
26+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.Memory<System.Char>)' does not exist in the implementation but it does exist in the contract.
27+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.ReadOnlyMemory<System.Char>)' does not exist in the implementation but it does exist in the contract.
28+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart(System.Span<System.Char>)' does not exist in the implementation but it does exist in the contract.
29+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.Memory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
30+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.Memory<T>, T)' does not exist in the implementation but it does exist in the contract.
31+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.ReadOnlyMemory<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
32+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.ReadOnlyMemory<T>, T)' does not exist in the implementation but it does exist in the contract.
33+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.ReadOnlySpan<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
34+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.ReadOnlySpan<T>, T)' does not exist in the implementation but it does exist in the contract.
35+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.Span<T>, System.ReadOnlySpan<T>)' does not exist in the implementation but it does exist in the contract.
36+
MembersMustExist : Member 'System.MemoryExtensions.TrimStart<T>(System.Span<T>, T)' does not exist in the implementation but it does exist in the contract.
37+
Total issues: 35

0 commit comments

Comments
 (0)