/// <summary> /// creates the tagged codeset component to insert into an IOR /// </summary> /// <returns></returns> private static TaggedComponent CreateCodesetComponent(Codec codec, int nativeCharSet, int nativeWCharSet) { Array wCharSets = Enum.GetValues(s_wCharSetType); Array charSets = Enum.GetValues(s_charSetType); int[] wCharSetCodes = new int[wCharSets.Length]; int[] charSetCodes = new int[charSets.Length]; for (int i = 0; i < wCharSets.Length; i++) { // Array.CopyTo doesn't work with mono for this case wCharSetCodes[i] = (int)wCharSets.GetValue(i); } for (int i = 0; i < charSets.Length; i++) { // Array.CopyTo doesn't work with mono for this case charSetCodes[i] = (int)charSets.GetValue(i); } Services.CodeSetComponentData codeSetCompData = new Services.CodeSetComponentData(nativeCharSet, charSetCodes, nativeWCharSet, wCharSetCodes); return new TaggedComponent(TAG_CODE_SETS.ConstVal, codec.encode_value(codeSetCompData)); }
/// <summary> /// serialise the given component data and adds it to the list of components. /// The data is encoded in a cdr encapsulation. /// </summary> public TaggedComponent AddComponentWithData(int tag, object data, Codec codec) { if ((data == null) || (codec == null)) { throw new BAD_PARAM(80, CompletionStatus.Completed_MayBe); } TaggedComponent result = new TaggedComponent(tag, codec.encode_value(data)); AddComponent(result); return result; }
public TestIORInterceptor(string name, string testId, Codec codec) { m_name = name; m_testId = testId; m_tc = new TaggedComponent(1000, codec.encode_value(new TestComponent(1))); }
public override IorProfile GetProfileForAddr(byte[] objectKey, Codec codec) { InternetIiopProfile result = new InternetIiopProfile(Version, Host, 0, objectKey); SSLComponentData sslComp = new SSLComponentData(SecurityAssociationOptions.EstablishTrustInClient, SecurityAssociationOptions.EstablishTrustInTarget, (short)Port); TaggedComponent sslTaggedComp = new TaggedComponent(TAG_SSL_SEC_TRANS.ConstVal, codec.encode_value(sslComp)); result.AddTaggedComponent(sslTaggedComp); return result; }