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

Commit ab92eab

Browse files
maryamariyantarekgh
authored andcommitted
More api work (#28581)
* StringBuilder.Equals: value to span * BrotliStream.[?Begin]Read/Write[?Async](): 'array' to 'buffer'
1 parent fe63206 commit ab92eab

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/System.IO.Compression.Brotli/ref/System.IO.Compression.Brotli.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ protected override void Dispose(bool disposing) { }
3939
public override void Flush() { }
4040
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState) { throw null; }
4141
public override int EndRead(IAsyncResult asyncResult) { throw null; }
42-
public override int Read(byte[] array, int offset, int count) { throw null; }
43-
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; }
42+
public override int Read(byte[] buffer, int offset, int count) { throw null; }
43+
public override System.Threading.Tasks.Task<int> ReadAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; }
4444
public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; }
4545
public override void SetLength(long value) { }
46-
public override IAsyncResult BeginWrite(byte[] array, int offset, int count, AsyncCallback asyncCallback, object asyncState) { throw null; }
46+
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState) { throw null; }
4747
public override void EndWrite(IAsyncResult asyncResult) { }
48-
public override void Write(byte[] array, int offset, int count) { }
49-
public override System.Threading.Tasks.Task WriteAsync(byte[] array, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; }
48+
public override void Write(byte[] buffer, int offset, int count) { }
49+
public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int count, System.Threading.CancellationToken cancellationToken) { throw null; }
5050
}
5151
}

src/System.IO.Compression.Brotli/src/System/IO/Compression/dec/BrotliStream.Decompress.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, Asy
7474
public override int EndRead(IAsyncResult asyncResult) =>
7575
TaskToApm.End<int>(asyncResult);
7676

77-
public override Task<int> ReadAsync(byte[] array, int offset, int count, CancellationToken cancellationToken)
77+
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
7878
{
79-
ValidateParameters(array, offset, count);
80-
return ReadAsync(new Memory<byte>(array, offset, count), cancellationToken).AsTask();
79+
ValidateParameters(buffer, offset, count);
80+
return ReadAsync(new Memory<byte>(buffer, offset, count), cancellationToken).AsTask();
8181
}
8282

8383
public override ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default(CancellationToken))

src/System.IO.Compression.Brotli/src/System/IO/Compression/enc/BrotliStream.Compress.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ internal void WriteCore(ReadOnlySpan<byte> buffer, bool isFinalBlock = false)
5151
}
5252
}
5353

54-
public override IAsyncResult BeginWrite(byte[] array, int offset, int count, AsyncCallback asyncCallback, object asyncState) =>
55-
TaskToApm.Begin(WriteAsync(array, offset, count, CancellationToken.None), asyncCallback, asyncState);
54+
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState) =>
55+
TaskToApm.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState);
5656

5757
public override void EndWrite(IAsyncResult asyncResult) =>
5858
TaskToApm.End(asyncResult);
5959

60-
public override Task WriteAsync(byte[] array, int offset, int count, CancellationToken cancellationToken)
60+
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
6161
{
62-
ValidateParameters(array, offset, count);
63-
return WriteAsync(new ReadOnlyMemory<byte>(array, offset, count), cancellationToken).AsTask();
62+
ValidateParameters(buffer, offset, count);
63+
return WriteAsync(new ReadOnlyMemory<byte>(buffer, offset, count), cancellationToken).AsTask();
6464
}
6565

6666
public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default(CancellationToken))

src/System.Runtime/ref/System.Runtime.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7562,7 +7562,7 @@ public StringBuilder(string value, int startIndex, int length, int capacity) { }
75627562
public void CopyTo(int sourceIndex, char[] destination, int destinationIndex, int count) { }
75637563
public void CopyTo(int sourceIndex, System.Span<char> destination, int count) { }
75647564
public int EnsureCapacity(int capacity) { throw null; }
7565-
public bool Equals(System.ReadOnlySpan<char> value) { throw null; }
7565+
public bool Equals(System.ReadOnlySpan<char> span) { throw null; }
75667566
public bool Equals(System.Text.StringBuilder sb) { throw null; }
75677567
public System.Text.StringBuilder Insert(int index, bool value) { throw null; }
75687568
public System.Text.StringBuilder Insert(int index, byte value) { throw null; }

0 commit comments

Comments
 (0)