Пример #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);
Пример #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()));
 }
Пример #3
0
 ValueTask <Guid> IAsyncBinaryReader.ReadGuidAsync(StringLengthEncoding lengthFormat, DecodingContext context, string format, CancellationToken token)
 => StreamExtensions.ReadGuidAsync(input, lengthFormat, context, buffer, format, token);
Пример #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);
Пример #5
0
 public ValueTask <string> ReadStringAsync(StringLengthEncoding lengthFormat, DecodingContext context, CancellationToken token = default)
 => StreamExtensions.ReadStringAsync(input, lengthFormat, context, buffer, token);
Пример #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);
Пример #7
0
 public ValueTask <T> ReadAsync <T>(CancellationToken token = default)
     where T : unmanaged
 => StreamExtensions.ReadAsync <T>(input, buffer, token);
Пример #8
0
 public ValueTask ReadAsync(Memory <byte> output, CancellationToken token = default)
 => StreamExtensions.ReadBlockAsync(input, output, token);
Пример #9
0
 public ValueTask <string> ReadStringAsync(int length, DecodingContext context, CancellationToken token = default)
 => StreamExtensions.ReadStringAsync(stream, length, context, buffer, token);
Пример #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);
Пример #11
0
 ValueTask <MemoryOwner <byte> > IAsyncBinaryReader.ReadAsync(LengthFormat lengthFormat, MemoryAllocator <byte>?allocator, CancellationToken token)
 => StreamExtensions.ReadBlockAsync(stream, lengthFormat, buffer, allocator, token);
Пример #12
0
 ValueTask <BigInteger> IAsyncBinaryReader.ReadBigIntegerAsync(LengthFormat lengthFormat, bool littleEndian, CancellationToken token)
 => StreamExtensions.ReadBigIntegerAsync(stream, lengthFormat, littleEndian, token);
Пример #13
0
 ValueTask <TimeSpan> IAsyncBinaryReader.ReadTimeSpanAsync(LengthFormat lengthFormat, DecodingContext context, IFormatProvider?provider, CancellationToken token)
 => StreamExtensions.ReadTimeSpanAsync(stream, lengthFormat, context, buffer, provider, token);
Пример #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);
Пример #15
0
 ValueTask <Guid> IAsyncBinaryReader.ReadGuidAsync(LengthFormat lengthFormat, DecodingContext context, CancellationToken token)
 => StreamExtensions.ReadGuidAsync(stream, lengthFormat, context, buffer, token);