internal Amqp091Frame(int type, short channel, IMessage message, IAmqpWriterFactory amqpWriterFactory) { Type = type; AssertValidFrameType(Type); Channel = channel; using (var memoryStream = new MemoryStream()) { using (var writer = amqpWriterFactory.Create(memoryStream)) { message.WriteTo(writer); } Payload = memoryStream.ToArray(); } Size = Payload.Length; }
public Amqp091FrameFactory(IAmqpWriterFactory amqpWriterFactory) { _amqpWriterFactory = amqpWriterFactory; }