Ejemplo n.º 1
0
        protected override void ReadDataFromStream(CdrInputStream inputStream)
        {
            // internet-iiop profile is encapsulated
            CdrEncapsulationInputStream encapsulation = inputStream.ReadEncapsulation();

            Debug.WriteLine("parse Internet IIOP Profile");
            byte giopMajor = encapsulation.ReadOctet();
            byte giopMinor = encapsulation.ReadOctet();

            m_giopVersion = new GiopVersion(giopMajor, giopMinor);

            Debug.WriteLine("giop-verion: " + m_giopVersion);
            m_hostName = encapsulation.ReadString();
            Debug.WriteLine("hostname: " + m_hostName);
            m_port = encapsulation.ReadUShort();
            Debug.WriteLine("port: " + m_port);
            uint objectKeyLength = encapsulation.ReadULong();

            m_objectKey = new byte[objectKeyLength];
            Debug.WriteLine("object key follows");
            for (uint i = 0; i < objectKeyLength; i++)
            {
                m_objectKey[i] = encapsulation.ReadOctet();
                Debug.Write(m_objectKey[i] + " ");
            }
            Debug.WriteLine("");
            // GIOP 1.1, 1.2:
            if (!(m_giopVersion.Major == 1 && m_giopVersion.Minor == 0))
            {
                m_taggedComponents = new TaggedComponentList(encapsulation);
            }

            Debug.WriteLine("parsing Internet-IIOP-profile completed");
        }
Ejemplo n.º 2
0
        private void Deserialise(byte[] contextData)
        {
            CdrEncapsulationInputStream encap =
                new CdrEncapsulationInputStream(contextData);

            m_charSet  = (int)encap.ReadULong();
            m_wcharSet = (int)encap.ReadULong();
        }
Ejemplo n.º 3
0
        protected override void ReadDataFromStream(CdrInputStream inputStream)
        {
            // internet-iiop profile is encapsulated
            CdrEncapsulationInputStream encapsulation = inputStream.ReadEncapsulation();

            Debug.WriteLine("parse Multiple component Profile");
            m_taggedComponents = new TaggedComponentList(encapsulation);

            Debug.WriteLine("parsing multiple components profile completed");
        }
Ejemplo n.º 4
0
        public object decode_value([IdlSequence(0L)] byte[] data,
                                   omg.org.CORBA.TypeCode tc)
        {
            CdrEncapsulationInputStream inputStream = new CdrEncapsulationInputStream(data, m_version);
            Type marshalAs = ((TypeCodeImpl)tc).GetClsForTypeCode();
            AttributeExtCollection marshalAsAttrs =
                ((TypeCodeImpl)tc).GetClsAttributesForTypeCode();
            Serializer ser =
                m_serFactory.Create(marshalAs,
                                    marshalAsAttrs);

            return(ser.Deserialize(inputStream));
        }
Ejemplo n.º 5
0
 private void Deserialise(byte[] contextData) {
     CdrEncapsulationInputStream encap = 
         new CdrEncapsulationInputStream(contextData);
     m_charSet = (int)encap.ReadULong();
     m_wcharSet = (int)encap.ReadULong();
 }
Ejemplo n.º 6
0
 public object decode_value ([IdlSequence(0L)] byte[] data,
                             omg.org.CORBA.TypeCode tc) {
     CdrEncapsulationInputStream inputStream = new CdrEncapsulationInputStream(data, m_version);
     Type marshalAs = ((TypeCodeImpl)tc).GetClsForTypeCode();
     AttributeExtCollection marshalAsAttrs = 
             ((TypeCodeImpl)tc).GetClsAttributesForTypeCode();            
     Serializer ser =
             m_serFactory.Create(marshalAs, 
                                 marshalAsAttrs);                    
     return ser.Deserialize(inputStream);
 }
Ejemplo n.º 7
0
 public object decode ([IdlSequence(0L)] byte[] data) {
     CdrEncapsulationInputStream inputStream = new CdrEncapsulationInputStream(data, m_version);
     return m_serializerForAnyType.Deserialize(inputStream);
 }
Ejemplo n.º 8
0
        public object decode([IdlSequence(0L)] byte[] data)
        {
            CdrEncapsulationInputStream inputStream = new CdrEncapsulationInputStream(data, m_version);

            return(m_serializerForAnyType.Deserialize(inputStream));
        }