Ejemplo n.º 1
0
 ValueTask <TimeSpan> IAsyncBinaryReader.ReadTimeSpanAsync(StringLengthEncoding lengthFormat, DecodingContext context, string[] formats, TimeSpanStyles style, IFormatProvider?provider, CancellationToken token)
 => StreamExtensions.ReadTimeSpanAsync(input, lengthFormat, context, buffer, formats, style, provider, token);
Ejemplo n.º 2
0
 public static void BufferWriterOverStreamExceptions()
 {
     Throws <ArgumentNullException>(() => StreamExtensions.AsBufferWriter(null, ArrayPool <byte> .Shared.ToAllocator()));
     using var ms = new MemoryStream(new byte[12], false);
     Throws <ArgumentException>(() => ms.AsBufferWriter(ArrayPool <byte> .Shared.ToAllocator()));
 }
Ejemplo n.º 3
0
 ValueTask <Guid> IAsyncBinaryReader.ReadGuidAsync(StringLengthEncoding lengthFormat, DecodingContext context, string format, CancellationToken token)
 => StreamExtensions.ReadGuidAsync(input, lengthFormat, context, buffer, format, token);
Ejemplo n.º 4
0
 ValueTask <DateTimeOffset> IAsyncBinaryReader.ReadDateTimeOffsetAsync(StringLengthEncoding lengthFormat, DecodingContext context, DateTimeStyles style, IFormatProvider?provider, CancellationToken token)
 => StreamExtensions.ReadDateTimeOffsetAsync(input, lengthFormat, context, buffer, style, provider, token);
Ejemplo n.º 5
0
 public ValueTask <string> ReadStringAsync(StringLengthEncoding lengthFormat, DecodingContext context, CancellationToken token = default)
 => StreamExtensions.ReadStringAsync(input, lengthFormat, context, buffer, token);
Ejemplo n.º 6
0
 ValueTask <double> IAsyncBinaryReader.ReadDoubleAsync(StringLengthEncoding lengthFormat, DecodingContext context, NumberStyles style, IFormatProvider?provider, CancellationToken token)
 => StreamExtensions.ReadDoubleAsync(input, lengthFormat, context, buffer, style, provider, token);
Ejemplo n.º 7
0
 public ValueTask <T> ReadAsync <T>(CancellationToken token = default)
     where T : unmanaged
 => StreamExtensions.ReadAsync <T>(input, buffer, token);
Ejemplo n.º 8
0
 public ValueTask ReadAsync(Memory <byte> output, CancellationToken token = default)
 => StreamExtensions.ReadBlockAsync(input, output, token);
Ejemplo n.º 9
0
 public ValueTask <string> ReadStringAsync(int length, DecodingContext context, CancellationToken token = default)
 => StreamExtensions.ReadStringAsync(stream, length, context, buffer, token);
Ejemplo n.º 10
0
 ValueTask <byte> IAsyncBinaryReader.ReadByteAsync(LengthFormat lengthFormat, DecodingContext context, NumberStyles style, IFormatProvider?provider, CancellationToken token)
 => StreamExtensions.ReadByteAsync(stream, lengthFormat, context, buffer, style, provider, token);
Ejemplo n.º 11
0
 ValueTask <MemoryOwner <byte> > IAsyncBinaryReader.ReadAsync(LengthFormat lengthFormat, MemoryAllocator <byte>?allocator, CancellationToken token)
 => StreamExtensions.ReadBlockAsync(stream, lengthFormat, buffer, allocator, token);
Ejemplo n.º 12
0
 ValueTask <BigInteger> IAsyncBinaryReader.ReadBigIntegerAsync(LengthFormat lengthFormat, bool littleEndian, CancellationToken token)
 => StreamExtensions.ReadBigIntegerAsync(stream, lengthFormat, littleEndian, token);
Ejemplo n.º 13
0
 ValueTask <TimeSpan> IAsyncBinaryReader.ReadTimeSpanAsync(LengthFormat lengthFormat, DecodingContext context, IFormatProvider?provider, CancellationToken token)
 => StreamExtensions.ReadTimeSpanAsync(stream, lengthFormat, context, buffer, provider, token);
Ejemplo n.º 14
0
 ValueTask <DateTime> IAsyncBinaryReader.ReadDateTimeAsync(LengthFormat lengthFormat, DecodingContext context, string[] formats, DateTimeStyles style, IFormatProvider?provider, CancellationToken token)
 => StreamExtensions.ReadDateTimeAsync(stream, lengthFormat, context, buffer, style, provider, token);
Ejemplo n.º 15
0
 ValueTask <Guid> IAsyncBinaryReader.ReadGuidAsync(LengthFormat lengthFormat, DecodingContext context, CancellationToken token)
 => StreamExtensions.ReadGuidAsync(stream, lengthFormat, context, buffer, token);