예제 #1
0
        public override TLVList getArguments()
        {
            TLVList list = new TLVList();

            if (_handle == null)
            {
                throw new MalformedMessageException("Detach header's handle can't be null");
            }

            list.addElement(0, AMQPWrapper <AMQPSymbol> .wrap(_handle));

            if (_closed != null)
            {
                list.addElement(1, AMQPWrapper <AMQPSymbol> .wrap(_closed));
            }

            if (_error != null)
            {
                list.addElement(2, _error.getList());
            }

            DescribedConstructor constructor = new DescribedConstructor(list.Code, new TLVFixed(AMQPType.SMALL_ULONG, new byte[] { (byte)_code }));

            list.Constructor = constructor;

            return(list);
        }
        public override TLVList getArguments()
        {
            TLVList list = new TLVList();

            if (_error != null)
            {
                list.addElement(0, _error.getList());
            }
            else
            {
                list.addElement(0, new TLVNull());
            }

            DescribedConstructor constructor = new DescribedConstructor(list.Code, new TLVFixed(AMQPType.SMALL_ULONG, new byte[] { (byte)_code }));

            list.Constructor = constructor;

            return(list);
        }