void HandleSaslCommand(Performative command) { if (command.DescriptorCode == SaslMechanisms.Code) { this.OnSaslServerMechanisms((SaslMechanisms)command); } else if (command.DescriptorCode == SaslInit.Code) { this.OnSaslInit((SaslInit)command); } else if (command.DescriptorCode == SaslChallenge.Code) { this.saslHandler.OnChallenge((SaslChallenge)command); } else if (command.DescriptorCode == SaslResponse.Code) { this.saslHandler.OnResponse((SaslResponse)command); } else if (command.DescriptorCode == SaslOutcome.Code) { this.OnSaslOutcome((SaslOutcome)command); } else { throw new AmqpException(AmqpErrorCode.NotAllowed, command.ToString()); } }
void HandleSaslCommand(Performative command) { Utils.Trace(TraceLevel.Verbose, "{0}: Handle SASL command {1}", this.transport, command); if (command.DescriptorCode == SaslMechanisms.Code) { this.OnSaslServerMechanisms((SaslMechanisms)command); } else if (command.DescriptorCode == SaslInit.Code) { this.OnSaslInit((SaslInit)command); } else if (command.DescriptorCode == SaslChallenge.Code) { this.saslHandler.OnChallenge((SaslChallenge)command); } else if (command.DescriptorCode == SaslResponse.Code) { this.saslHandler.OnResponse((SaslResponse)command); } else if (command.DescriptorCode == SaslOutcome.Code) { this.OnSaslOutcome((SaslOutcome)command); } else { throw new AmqpException(AmqpError.NotAllowed, command.ToString()); } }