Esempio n. 1
0
        public void TestGetHeaderFlagsForPlatform()
        {
            byte expected;

            if (BitConverter.IsLittleEndian)
            {
                expected = 1;
            }
            else
            {
                expected = 0;
            }
            Assert.AreEqual(expected,
                            GiopHeader.GetDefaultHeaderFlagsForPlatform());
        }
Esempio n. 2
0
        private CdrEncapsulationOutputStream GetProfileContentStream()
        {
            CdrEncapsulationOutputStream encapStream = new CdrEncapsulationOutputStream(GiopHeader.GetDefaultHeaderFlagsForPlatform());

            // the tagged components
            m_taggedComponents.WriteTaggedComponentList(encapStream);
            return(encapStream);
        }
Esempio n. 3
0
        /// <summary>
        /// create an IOP service context from the code set service context
        /// </summary>
        /// <returns></returns>
        public omg.org.IOP.ServiceContext CreateServiceContext()
        {
            CdrEncapsulationOutputStream encapStream = new CdrEncapsulationOutputStream(GiopHeader.GetDefaultHeaderFlagsForPlatform());

            encapStream.WriteULong((uint)m_charSet);
            encapStream.WriteULong((uint)m_wcharSet);
            return(new omg.org.IOP.ServiceContext(CodeSetService.SERVICE_ID,
                                                  encapStream.GetEncapsulationData()));
        }
Esempio n. 4
0
        private CdrEncapsulationOutputStream GetProfileContentStream()
        {
            CdrEncapsulationOutputStream encapStream = new CdrEncapsulationOutputStream(GiopHeader.GetDefaultHeaderFlagsForPlatform());

            encapStream.WriteOctet(m_giopVersion.Major);
            encapStream.WriteOctet(m_giopVersion.Minor);
            encapStream.WriteString(m_hostName);
            encapStream.WriteUShort(m_port);
            encapStream.WriteULong((uint)m_objectKey.Length);
            encapStream.WriteOpaque(m_objectKey);
            // the tagged components
            if (!(m_giopVersion.Major == 1 && m_giopVersion.Minor == 0))
            { // for GIOP >= 1.1, tagged components are possible
                m_taggedComponents.WriteTaggedComponentList(encapStream);
            }
            return(encapStream);
        }