Ejemplo n.º 1
0
 public ReadResult(System.Buffers.ReadOnlySequence <byte> buffer, bool isCanceled, bool isCompleted)
 {
     throw null;
 }
 public Utf8JsonReader(System.Buffers.ReadOnlySequence <byte> jsonData, bool isFinalBlock, System.Text.Json.JsonReaderState state)
 {
     throw null;
 }
 public static System.Threading.Tasks.Task WriteMessageAsync(System.Buffers.ReadOnlySequence <byte> payload, System.IO.Stream output)
 {
     throw null;
 }
 public static Azure.Core.RequestContent Create(System.Buffers.ReadOnlySequence<byte> bytes) { throw null; }
Ejemplo n.º 5
0
 public Enumerator(System.Buffers.ReadOnlySequence <T> sequence)
 {
     throw null;
 }
Ejemplo n.º 6
0
 public Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketAwaitableEventArgs SendAsync(System.Buffers.ReadOnlySequence <byte> buffers)
 {
     throw null;
 }
 internal void ParseFormValues(ref System.Buffers.ReadOnlySequence <byte> buffer, ref Microsoft.AspNetCore.WebUtilities.KeyValueAccumulator accumulator, bool isFinalBlock)
 {
 }
Ejemplo n.º 8
0
 public System.Threading.Tasks.ValueTask WriteAsync(System.Buffers.ReadOnlySequence <byte> buffers, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     throw null;
 }
 public static bool TryParseRequestMessage(ref System.Buffers.ReadOnlySequence <byte> buffer, out Microsoft.AspNetCore.SignalR.Protocol.HandshakeRequestMessage requestMessage)
 {
     throw null;
 }
Ejemplo n.º 10
0
 public void Play()
 {
     var seq  = new System.Buffers.ReadOnlySequence <byte>(new ReadOnlyMemory <byte>(new byte[1000]));
     var seq2 = seq.Slice(3);
     var pos  = seq2.GetPosition(0);
 }
Ejemplo n.º 11
0
 public static T[] ToArray <T>(this System.Buffers.ReadOnlySequence <T> sequence)
 {
     throw null;
 }
Ejemplo n.º 12
0
 public static System.Nullable <System.SequencePosition> PositionOf <T>(this System.Buffers.ReadOnlySequence <T> sequence, T value) where T : System.IEquatable <T>
 {
     throw null;
 }
Ejemplo n.º 13
0
 public static void CopyTo <T>(this System.Buffers.ReadOnlySequence <T> sequence, System.Span <T> destination)
 {
 }
 public Utf8JsonReader(System.Buffers.ReadOnlySequence <byte> jsonData, System.Text.Json.JsonReaderOptions options = default(System.Text.Json.JsonReaderOptions))
 {
     throw null;
 }
 public static System.IO.Pipelines.PipeReader Create(System.Buffers.ReadOnlySequence <byte> sequence)
 {
     throw null;
 }
Ejemplo n.º 16
0
 public static System.Text.Json.JsonDocument Parse(System.Buffers.ReadOnlySequence <byte> utf8Json, System.Text.Json.JsonReaderOptions readerOptions = default(System.Text.Json.JsonReaderOptions))
 {
     throw null;
 }
Ejemplo n.º 17
0
 public bool TryParseMessage(ref System.Buffers.ReadOnlySequence <byte> input, Microsoft.AspNetCore.SignalR.IInvocationBinder binder, out Microsoft.AspNetCore.SignalR.Protocol.HubMessage message)
 {
     throw null;
 }
Ejemplo n.º 18
0
        private async Task WriteOutputAsync(Stream stream)
        {
            try
            {
                if (stream == null)
                {
                    return;
                }

                while (true)
                {
                    ReadResult result = await Output.Reader.ReadAsync();

                    System.Buffers.ReadOnlySequence <byte> buffer = result.Buffer;

                    try
                    {
                        if (buffer.IsEmpty)
                        {
                            if (result.IsCompleted)
                            {
                                _stream.Dispose();
                                break;
                            }
                            await stream.FlushAsync();
                        }
                        else if (buffer.IsSingleSegment)
                        {
                            if (!MemoryMarshal.TryGetArray(buffer.First, out ArraySegment <byte> segment))
                            {
                                throw new InvalidOperationException("Buffer backed by array was expected");
                            }

                            await stream.WriteAsync(segment.Array, segment.Offset, segment.Count);

                            // Once we've moved past netstandard2.0, we can replace the code with this line:
                            // await stream.WriteAsync(buffer.First);
                        }
                        else
                        {
                            foreach (ReadOnlyMemory <byte> memory in buffer)
                            {
                                if (!MemoryMarshal.TryGetArray(memory, out ArraySegment <byte> segment))
                                {
                                    throw new InvalidOperationException("Buffer backed by array was expected");
                                }

                                await stream.WriteAsync(segment.Array, segment.Offset, segment.Count);

                                // Once we've moved past netstandard2.0, we can replace the code with this line:
                                // await stream.WriteAsync(memory);
                            }
                        }
                    }
                    finally
                    {
                        Output.Reader.AdvanceTo(buffer.End);
                    }
                }
            }
            catch (Exception)
            {
                // TODO: make sure the exception propagates somehow
            }
            finally
            {
                Output.Reader.Complete();
            }
        }
Ejemplo n.º 19
0
 public static OmniHash Import(System.Buffers.ReadOnlySequence <byte> sequence, Omnix.Base.BufferPool bufferPool)
 {
     return(Formatter.Deserialize(new Omnix.Serialization.RocketPack.RocketPackReader(sequence, bufferPool), 0));
 }