Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Span-ify System.Text #915

Merged
merged 1 commit into from
Oct 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions netstandard/ref/System.Text.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,17 @@ protected Decoder() { }
[System.CLSCompliantAttribute(false)]
public unsafe virtual void Convert(byte* bytes, int byteCount, char* chars, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed) { bytesUsed = default(int); charsUsed = default(int); completed = default(bool); }
public virtual void Convert(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed) { bytesUsed = default(int); charsUsed = default(int); completed = default(bool); }
public virtual void Convert(System.ReadOnlySpan<byte> bytes, System.Span<char> chars, bool flush, out int bytesUsed, out int charsUsed, out bool completed) { bytesUsed = default(int); charsUsed = default(int); completed = default(bool); }
[System.CLSCompliantAttribute(false)]
public unsafe virtual int GetCharCount(byte* bytes, int count, bool flush) { throw null; }
public abstract int GetCharCount(byte[] bytes, int index, int count);
public virtual int GetCharCount(byte[] bytes, int index, int count, bool flush) { throw null; }
public virtual int GetCharCount(System.ReadOnlySpan<byte> bytes, bool flush) { throw null; }
[System.CLSCompliantAttribute(false)]
public unsafe virtual int GetChars(byte* bytes, int byteCount, char* chars, int charCount, bool flush) { throw null; }
public abstract int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex);
public virtual int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, bool flush) { throw null; }
public virtual int GetChars(System.ReadOnlySpan<byte> bytes, System.Span<char> chars, bool flush) { throw null; }
public virtual void Reset() { }
}
public sealed partial class DecoderExceptionFallback : System.Text.DecoderFallback
Expand Down Expand Up @@ -115,12 +118,15 @@ protected Encoder() { }
[System.CLSCompliantAttribute(false)]
public unsafe virtual void Convert(char* chars, int charCount, byte* bytes, int byteCount, bool flush, out int charsUsed, out int bytesUsed, out bool completed) { charsUsed = default(int); bytesUsed = default(int); completed = default(bool); }
public virtual void Convert(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, int byteCount, bool flush, out int charsUsed, out int bytesUsed, out bool completed) { charsUsed = default(int); bytesUsed = default(int); completed = default(bool); }
public virtual void Convert(System.ReadOnlySpan<char> chars, System.Span<byte> bytes, bool flush, out int charsUsed, out int bytesUsed, out bool completed) { charsUsed = default(int); bytesUsed = default(int); completed = default(bool); }
[System.CLSCompliantAttribute(false)]
public unsafe virtual int GetByteCount(char* chars, int count, bool flush) { throw null; }
public abstract int GetByteCount(char[] chars, int index, int count, bool flush);
public virtual int GetByteCount(System.ReadOnlySpan<char> chars, bool flush) { throw null; }
[System.CLSCompliantAttribute(false)]
public unsafe virtual int GetBytes(char* chars, int charCount, byte* bytes, int byteCount, bool flush) { throw null; }
public abstract int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex, bool flush);
public virtual int GetBytes(System.ReadOnlySpan<char> chars, System.Span<byte> bytes, bool flush) { throw null; }
public virtual void Reset() { }
}
public sealed partial class EncoderExceptionFallback : System.Text.EncoderFallback
Expand Down Expand Up @@ -209,6 +215,7 @@ protected Encoding(int codePage, System.Text.EncoderFallback encoderFallback, Sy
public virtual bool IsMailNewsSave { get { throw null; } }
public bool IsReadOnly { get { throw null; } }
public virtual bool IsSingleByte { get { throw null; } }
public virtual System.ReadOnlySpan<byte> Preamble { get { throw null; } }
public static System.Text.Encoding Unicode { get { throw null; } }
public static System.Text.Encoding UTF32 { get { throw null; } }
public static System.Text.Encoding UTF7 { get { throw null; } }
Expand All @@ -223,25 +230,29 @@ protected Encoding(int codePage, System.Text.EncoderFallback encoderFallback, Sy
public unsafe virtual int GetByteCount(char* chars, int count) { throw null; }
public virtual int GetByteCount(char[] chars) { throw null; }
public abstract int GetByteCount(char[] chars, int index, int count);
public virtual int GetByteCount(System.ReadOnlySpan<char> chars) { throw null; }
public virtual int GetByteCount(string s) { throw null; }
public int GetByteCount(string s, int index, int count) { throw null; }
[System.CLSCompliantAttribute(false)]
public unsafe virtual int GetBytes(char* chars, int charCount, byte* bytes, int byteCount) { throw null; }
public virtual byte[] GetBytes(char[] chars) { throw null; }
public virtual byte[] GetBytes(char[] chars, int index, int count) { throw null; }
public abstract int GetBytes(char[] chars, int charIndex, int charCount, byte[] bytes, int byteIndex);
public virtual int GetBytes(System.ReadOnlySpan<char> chars, System.Span<byte> bytes) { throw null; }
public virtual byte[] GetBytes(string s) { throw null; }
public byte[] GetBytes(string s, int index, int count) { throw null; }
public virtual int GetBytes(string s, int charIndex, int charCount, byte[] bytes, int byteIndex) { throw null; }
[System.CLSCompliantAttribute(false)]
public unsafe virtual int GetCharCount(byte* bytes, int count) { throw null; }
public virtual int GetCharCount(byte[] bytes) { throw null; }
public abstract int GetCharCount(byte[] bytes, int index, int count);
public virtual int GetCharCount(System.ReadOnlySpan<byte> bytes) { throw null; }
[System.CLSCompliantAttribute(false)]
public unsafe virtual int GetChars(byte* bytes, int byteCount, char* chars, int charCount) { throw null; }
public virtual char[] GetChars(byte[] bytes) { throw null; }
public virtual char[] GetChars(byte[] bytes, int index, int count) { throw null; }
public abstract int GetChars(byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex);
public virtual int GetChars(System.ReadOnlySpan<byte> bytes, System.Span<char> chars) { throw null; }
public virtual System.Text.Decoder GetDecoder() { throw null; }
public virtual System.Text.Encoder GetEncoder() { throw null; }
public static System.Text.Encoding GetEncoding(int codepage) { throw null; }
Expand All @@ -257,6 +268,7 @@ protected Encoding(int codePage, System.Text.EncoderFallback encoderFallback, Sy
public unsafe string GetString(byte* bytes, int byteCount) { throw null; }
public virtual string GetString(byte[] bytes) { throw null; }
public virtual string GetString(byte[] bytes, int index, int count) { throw null; }
public string GetString(System.ReadOnlySpan<byte> bytes) { throw null; }
public bool IsAlwaysNormalized() { throw null; }
public virtual bool IsAlwaysNormalized(System.Text.NormalizationForm form) { throw null; }
public static void RegisterProvider(System.Text.EncodingProvider provider) { }
Expand Down Expand Up @@ -313,6 +325,7 @@ public StringBuilder(string value, int startIndex, int length, int capacity) { }
public System.Text.StringBuilder Append(int value) { throw null; }
public System.Text.StringBuilder Append(long value) { throw null; }
public System.Text.StringBuilder Append(object value) { throw null; }
public System.Text.StringBuilder Append(System.ReadOnlySpan<char> value) { throw null; }
[System.CLSCompliantAttribute(false)]
public System.Text.StringBuilder Append(sbyte value) { throw null; }
public System.Text.StringBuilder Append(float value) { throw null; }
Expand Down Expand Up @@ -344,7 +357,9 @@ public StringBuilder(string value, int startIndex, int length, int capacity) { }
public System.Text.StringBuilder AppendLine(string value) { throw null; }
public System.Text.StringBuilder Clear() { throw null; }
public void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count) { }
public void CopyTo(int sourceIndex, System.Span<char> destination, int count) { }
public int EnsureCapacity(int capacity) { throw null; }
public bool Equals(System.ReadOnlySpan<char> span) { throw null; }
public bool Equals(System.Text.StringBuilder sb) { throw null; }
public System.Text.StringBuilder Insert(int index, bool value) { throw null; }
public System.Text.StringBuilder Insert(int index, byte value) { throw null; }
Expand All @@ -357,6 +372,7 @@ public void CopyTo(int sourceIndex, char[] destination, int destinationIndex, in
public System.Text.StringBuilder Insert(int index, int value) { throw null; }
public System.Text.StringBuilder Insert(int index, long value) { throw null; }
public System.Text.StringBuilder Insert(int index, object value) { throw null; }
public System.Text.StringBuilder Insert(int index, System.ReadOnlySpan<char> value) { throw null; }
[System.CLSCompliantAttribute(false)]
public System.Text.StringBuilder Insert(int index, sbyte value) { throw null; }
public System.Text.StringBuilder Insert(int index, float value) { throw null; }
Expand Down
18 changes: 17 additions & 1 deletion netstandard/src/ApiCompatBaseline.net461.txt
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,21 @@ TypesMustExist : Type 'System.Security.Cryptography.ECParameters' does not exist
TypesMustExist : Type 'System.Security.Cryptography.ECPoint' does not exist in the implementation but it does exist in the contract.
TypeCannotChangeClassification : Type 'System.Security.Cryptography.HashAlgorithmName' is marked as readonly in the contract so it must also be marked readonly in the implementation.
TypesMustExist : Type 'System.Security.Cryptography.IncrementalHash' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Decoder.Convert(System.ReadOnlySpan<System.Byte>, System.Span<System.Char>, System.Boolean, System.Int32, System.Int32, System.Boolean)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Decoder.GetCharCount(System.ReadOnlySpan<System.Byte>, System.Boolean)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Decoder.GetChars(System.ReadOnlySpan<System.Byte>, System.Span<System.Char>, System.Boolean)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoder.Convert(System.ReadOnlySpan<System.Char>, System.Span<System.Byte>, System.Boolean, System.Int32, System.Int32, System.Boolean)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoder.GetByteCount(System.ReadOnlySpan<System.Char>, System.Boolean)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoder.GetBytes(System.ReadOnlySpan<System.Char>, System.Span<System.Byte>, System.Boolean)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoding.GetByteCount(System.ReadOnlySpan<System.Char>)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoding.GetByteCount(System.String, System.Int32, System.Int32)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoding.GetBytes(System.ReadOnlySpan<System.Char>, System.Span<System.Byte>)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoding.GetBytes(System.String, System.Int32, System.Int32)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoding.GetCharCount(System.ReadOnlySpan<System.Byte>)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoding.GetChars(System.ReadOnlySpan<System.Byte>, System.Span<System.Char>)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoding.GetString(System.ReadOnlySpan<System.Byte>)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.Encoding.Preamble.get()' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.StringBuilder.Append(System.ReadOnlySpan<System.Char>)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.StringBuilder.Append(System.Text.StringBuilder)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.StringBuilder.Append(System.Text.StringBuilder, System.Int32, System.Int32)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.StringBuilder.AppendJoin(System.Char, System.Object[])' does not exist in the implementation but it does exist in the contract.
Expand All @@ -510,6 +523,9 @@ MembersMustExist : Member 'System.Text.StringBuilder.AppendJoin(System.String, S
MembersMustExist : Member 'System.Text.StringBuilder.AppendJoin(System.String, System.String[])' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.StringBuilder.AppendJoin<T>(System.Char, System.Collections.Generic.IEnumerable<T>)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.StringBuilder.AppendJoin<T>(System.String, System.Collections.Generic.IEnumerable<T>)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.StringBuilder.CopyTo(System.Int32, System.Span<System.Char>, System.Int32)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.StringBuilder.Equals(System.ReadOnlySpan<System.Char>)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.StringBuilder.Insert(System.Int32, System.ReadOnlySpan<System.Char>)' does not exist in the implementation but it does exist in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Text.RegularExpressions.CaptureCollection' does not implement interface 'System.Collections.Generic.ICollection<System.Text.RegularExpressions.Capture>' in the implementation but it does in the contract.
MembersMustExist : Member 'System.Text.RegularExpressions.CaptureCollection.CopyTo(System.Text.RegularExpressions.Capture[], System.Int32)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Text.RegularExpressions.Group.Name.get()' does not exist in the implementation but it does exist in the contract.
Expand Down Expand Up @@ -560,4 +576,4 @@ MembersMustExist : Member 'System.Xml.Linq.XNode.WriteToAsync(System.Xml.XmlWrit
MembersMustExist : Member 'System.Xml.Linq.XProcessingInstruction.WriteToAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Xml.Linq.XText.WriteToAsync(System.Xml.XmlWriter, System.Threading.CancellationToken)' does not exist in the implementation but it does exist in the contract.
TypesMustExist : Type 'System.Xml.XPath.XDocumentExtensions' does not exist in the implementation but it does exist in the contract.
Total Issues: 561
Total Issues: 577
Loading