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);
}