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

Commit 792c5cd

Browse files
committed
T
1 parent 1f7f6a2 commit 792c5cd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ namespace System.Buffers
219219
public partial interface IBufferWriter<T>
220220
{
221221
void Advance(int count);
222-
System.Memory<byte> GetMemory(int minimumLength = 0);
223-
System.Span<byte> GetSpan(int minimumLength = 0);
222+
System.Memory<T> GetMemory(int minimumLength = 0);
223+
System.Span<T> GetSpan(int minimumLength = 0);
224224
int MaxBufferSize { get; }
225225
}
226226
public partial interface IMemoryList<T>
@@ -280,7 +280,7 @@ public static partial class BuffersExtensions
280280
public static void CopyTo<T>(this System.Buffers.ReadOnlySequence<T> sequence, System.Span<T> destination) { }
281281
public static System.Nullable<System.SequencePosition> PositionOf<T>(this System.Buffers.ReadOnlySequence<T> sequence, T value) where T : System.IEquatable<T> { throw null; }
282282
public static T[] ToArray<T>(this System.Buffers.ReadOnlySequence<T> sequence) { throw null; }
283-
public static void Write<T>(this System.Buffers.IBufferWriter<T> bufferWriter, ReadOnlySpan<byte> source) { }
283+
public static void Write<T>(this System.Buffers.IBufferWriter<T> bufferWriter, ReadOnlySpan<T> source) { }
284284
}
285285
public readonly partial struct ReadOnlySequence<T>
286286
{

src/System.Memory/src/System/Buffers/BuffersExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static T[] ToArray<T>(this ReadOnlySequence<T> sequence)
5858
/// <summary>
5959
/// Writes contents of <paramref name="source"/> to <paramref name="bufferWriter"/>
6060
/// </summary>
61-
public static void Write<T>(this IBufferWriter<T> bufferWriter, ReadOnlySpan<byte> source)
61+
public static void Write<T>(this IBufferWriter<T> bufferWriter, ReadOnlySpan<T> source)
6262
{
6363
Span<byte> destination = bufferWriter.GetSpan();
6464

src/System.Memory/src/System/Buffers/IBufferWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ public interface IBufferWriter<T>
1717
/// Requests the <see cref="Memory{Byte}"/> of at least <paramref name="minimumLength"/> in size.
1818
/// If <paramref name="minimumLength"/> is equal to <code>0</code>, currently available memory would get returned.
1919
/// </summary>
20-
Memory<byte> GetMemory(int minimumLength = 0);
20+
Memory<T> GetMemory(int minimumLength = 0);
2121

2222
/// <summary>
2323
/// Requests the <see cref="Span{Byte}"/> of at least <paramref name="minimumLength"/> in size.
2424
/// If <paramref name="minimumLength"/> is equal to <code>0</code>, currently available memory would get returned.
2525
/// </summary>
26-
Span<byte> GetSpan(int minimumLength = 0);
26+
Span<T> GetSpan(int minimumLength = 0);
2727

2828
/// <summary>
2929
/// Returns the maximum buffer size supported by this <see cref="IBufferWriter{T}"/>.

0 commit comments

Comments
 (0)