public void Decode(ByteBuffer buffer)
 {
     if (buffer.Length < this.EncodeSize)
     {
         throw AmqpEncoding.GetEncodingException(SRAmqp.AmqpInsufficientBufferSize(this.EncodeSize, buffer.Length));
     }
     if (AmqpBitConverter.ReadUInt(buffer) != 1095586128)
     {
         throw AmqpEncoding.GetEncodingException("ProtocolName");
     }
     this.protocolId = (Microsoft.ServiceBus.Messaging.Amqp.ProtocolId)AmqpBitConverter.ReadUByte(buffer);
     this.version    = new AmqpVersion(AmqpBitConverter.ReadUByte(buffer), AmqpBitConverter.ReadUByte(buffer), AmqpBitConverter.ReadUByte(buffer));
 }
 public ProtocolHeader(Microsoft.ServiceBus.Messaging.Amqp.ProtocolId id, AmqpVersion version)
 {
     this.protocolId = id;
     this.version    = version;
 }