Microsoft.Azure.Amqp.AsyncIO.AsyncReader.HandleFrameSizeReadComplete C# (CSharp) Method

HandleFrameSizeReadComplete() private method

private HandleFrameSizeReadComplete ( TransportAsyncCallbackArgs args ) : void
args Microsoft.Azure.Amqp.Transport.TransportAsyncCallbackArgs
return void
            void HandleFrameSizeReadComplete(TransportAsyncCallbackArgs args)
            {
                Fx.Assert(args.Buffer == this.frameSizeBuffer.Array, "wrong buffer");
                int frameSize = (int)AmqpBitConverter.ReadUInt(this.frameSizeBuffer.Array, this.frameSizeBuffer.Offset, FixedWidth.UInt);
                Fx.Assert(frameSize > 0, "frameSize must be positive");
                if (frameSize <= 0 || frameSize > this.maxFrameSize)
                {
                    throw new AmqpException(AmqpErrorCode.FramingError, CommonResources.GetString(CommonResources.InvalidFrameSize, frameSize, this.maxFrameSize));
                }

                this.SetReadFrameBody(frameSize);
            }