Apache.NMS.ActiveMQ.Transport.Mock.OpenWireResponseBuilder.BuildIncomingCommands C# (CSharp) Method

BuildIncomingCommands() public method

public BuildIncomingCommands ( Command command ) : List
command Command
return List
        public List<Command> BuildIncomingCommands(Command command)
        {
            List<Command> commands = new List<Command>();

            // Delegate this to buildResponse
            if( command.ResponseRequired )
            {
                commands.Add( this.BuildResponse( command ) );
            }

            if( command.IsWireFormatInfo )
            {
                // Return a copy of the callers own requested WireFormatInfo
                // so they get exactly the settings they asked for.
                commands.Add( (Command) command.Clone() );
            }

            return commands;
        }