public void write_StringValue(string val) {
     object boxed = new StringValue(val);
     Marshal(s_stringValueType, AttributeExtCollection.EmptyCollection,
             boxed, m_cdrOut);
 }
Example #2
0
        public void BoxBoxedValueTypeFromBoxed()
        {
            omg.org.CORBA.TypeCode tc =
                new ValueBoxTC("IDL:omg.org/CORBA/StringValue:1.0", "StringValue",
                               new StringTC());
            StringValue toBoxInto = new StringValue("test");
            Any anyContainer = new Any(toBoxInto, tc);
            Assert.AreEqual(tc, anyContainer.Type, "wrong tc");
            Assert.AreEqual(toBoxInto,
                                   anyContainer.ValueInternalRepresenation, "wrong val");
            Assert.AreEqual(ReflectionHelper.StringValueType,
                                   anyContainer.ValueInternalRepresenation.GetType(), "wrong val type");

            Assert.AreEqual(toBoxInto.Unbox(),
                                   anyContainer.Value, "wrong val");
            Assert.AreEqual(ReflectionHelper.StringType,
                                   anyContainer.Value.GetType(), "wrong val type");
        }