/// <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())); }
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); }
internal override void WriteToStream(CdrOutputStream cdrStream, SerializerFactory serFactory) { base.WriteToStream(cdrStream, serFactory); CdrEncapsulationOutputStream encap = new CdrEncapsulationOutputStream(cdrStream); encap.WriteString(m_id); encap.WriteString(m_name); encap.WriteShort(m_typeMod); TypeCodeSerializer ser = new TypeCodeSerializer(serFactory); // ser baseclass type ser.Serialize(m_baseClass, encap); // ser members encap.WriteULong((uint)m_members.Length); foreach (ValueMember member in m_members) { encap.WriteString(member.name); ser.Serialize(member.type, encap); encap.WriteShort(member.access); } encap.WriteToTargetStream(); }
internal override void WriteToStream(CdrOutputStream cdrStream, SerializerFactory serFactory) { // write common part: typecode nr base.WriteToStream(cdrStream, serFactory); // complex type-code: in encapsulation CdrEncapsulationOutputStream encap = new CdrEncapsulationOutputStream(cdrStream); encap.WriteString(m_id); encap.WriteString(m_name); TypeCodeSerializer ser = new TypeCodeSerializer(serFactory); Type discrTypeCls = ((TypeCodeImpl)m_discriminatorType).GetClsForTypeCode(); ser.Serialize(m_discriminatorType, encap); encap.WriteLong(m_defaultCase); encap.WriteULong((uint)m_members.Length); Serializer serDisc = serFactory.Create(discrTypeCls, AttributeExtCollection.EmptyCollection); for (int i = 0; i < m_members.Length; i++) { serDisc.Serialize(m_members[i].DiscriminatorValue, encap); encap.WriteString(m_members[i].ElementName); ser.Serialize(m_members[i].ElementType, encap); } encap.WriteToTargetStream(); }
internal override void WriteToStream(CdrOutputStream cdrStream, SerializerFactory serFactory) { base.WriteToStream(cdrStream, serFactory); CdrEncapsulationOutputStream encap = new CdrEncapsulationOutputStream(cdrStream); encap.WriteString(m_id); encap.WriteString(m_name); encap.WriteULong((uint)m_members.Length); TypeCodeSerializer ser = new TypeCodeSerializer(serFactory); foreach (StructMember member in m_members) { encap.WriteString(member.name); ser.Serialize(member.type, encap); } encap.WriteToTargetStream(); }
internal override void WriteToStream(CdrOutputStream cdrStream, SerializerFactory serFactory) { base.WriteToStream(cdrStream, serFactory); CdrEncapsulationOutputStream encap = new CdrEncapsulationOutputStream(cdrStream); TypeCodeSerializer ser = new TypeCodeSerializer(serFactory); ser.Serialize(m_innerDimension, encap); encap.WriteULong((uint)m_length); encap.WriteToTargetStream(); }
internal override void WriteToStream(CdrOutputStream cdrStream, SerializerFactory serFactory) { base.WriteToStream(cdrStream, serFactory); CdrEncapsulationOutputStream encap = new CdrEncapsulationOutputStream(cdrStream); encap.WriteString(m_id); encap.WriteString(m_name); encap.WriteULong((uint)m_members.Length); foreach (string member in m_members) { encap.WriteString(member); } encap.WriteToTargetStream(); }
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; }
/// <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()); }