internal bool OnHeader(ProtocolHeader header)
{
Trace.WriteLine(TraceLevel.Frame, "RECV AMQP {0}", header);
lock (this.ThisLock)
{
if (this.state == State.OpenPipe)
{
this.state = State.OpenSent;
}
else if (this.state == State.OpenClosePipe)
{
this.state = State.ClosePipe;
}
else
{
throw new AmqpException(ErrorCode.IllegalState,
Fx.Format(SRAmqp.AmqpIllegalOperationState, "OnHeader", this.state));
}
if (header.Major != 1 || header.Minor != 0 || header.Revision != 0)
{
throw new AmqpException(ErrorCode.NotImplemented, header.ToString());
}
}
return true;
}