Пример #1
0
        public override void Deserialise(Corba.DataInputStream arg)
        {
            // skip rmi data
            arg.read_octet();
            arg.read_octet();
            // size
            int size = arg.read_long();

            // size of backing array
            m_backArraySize = arg.read_long();
            // elements
            m_elements = new object[size];
            for (int i = 0; i < size; i++)
            {
                // something like a bool or octet:
                bool isByRef = arg.read_boolean();
                if (!isByRef)
                {
                    m_elements[i] = arg.read_Value();
                    if (m_elements[i] is BoxedValueBase)
                    {
                        m_elements[i] = ((BoxedValueBase)m_elements[i]).Unbox();
                    }
                }
                else
                {
                    m_elements[i] = arg.read_Object();
                }
            }
        }
Пример #2
0
        private object ReadObject(Corba.DataInputStream source)
        {
            object result     = null;
            bool   isByRefObj = source.read_boolean();

            if (!isByRefObj)
            {
                result = source.read_Value();
                if (result is BoxedValueBase)
                {
                    result = ((BoxedValueBase)result).Unbox();
                }
            }
            else
            {
                result = source.read_Object();
            }
            return(result);
        }