Ejemplo n.º 1
0
        static void doUpdate23(mtest.Ipublishable_dictionary data)
        {
            mtest.BasicTypes bt = new mtest.BasicTypes();
            bt.anInt   = -999;
            bt.aString = "someName";

            data.data.dictionary_four["someName"] = bt;
        }
Ejemplo n.º 2
0
        internal static void doUpdate2(mtest.IStructSix data)
        {
            //modify substructure inside vector
            data.aggregate.name = "changed name";

            data.basic.anInt  = -2;
            data.basic.anUInt = 3;
            data.basic.aReal  = 4.0;

            mtest.IBasicTypes aggr = new  mtest.BasicTypes();
            aggr.anInt   = -200;
            aggr.anUInt  = 300;
            aggr.aReal   = 400.0;
            aggr.aString = "new part";
            data.aggregate.theAggregate = aggr;
        }
        public static mtest.struct_dictionary GetDictionary_2()
        {
            mtest.struct_dictionary data = new mtest.struct_dictionary();

            data.dictionary_one.Add("hello", "world");
            data.dictionary_one.Add("red", "blue");
            data.dictionary_one.Add("dog", "cat");


            mtest.IAggregateType aggr1 = new mtest.AggregateType();
            aggr1.name = "aggr1";
            aggr1.theAggregate.anInt   = -5;
            aggr1.theAggregate.anUInt  = 5;
            aggr1.theAggregate.aReal   = 3.14;
            aggr1.theAggregate.aString = "hello!";
            aggr1.lastValue            = 99;

            mtest.IAggregateType aggr2 = new mtest.AggregateType();
            aggr2.name = "aggr1";
            aggr2.theAggregate.anInt   = -5;
            aggr2.theAggregate.anUInt  = 5;
            aggr2.theAggregate.aReal   = 3.14;
            aggr2.theAggregate.aString = "hello!";
            aggr2.lastValue            = 99;

            mtest.IAggregateType aggr3 = new mtest.AggregateType();
            aggr3.name = "aggr1";
            aggr3.theAggregate.anInt   = -5;
            aggr3.theAggregate.anUInt  = 5;
            aggr3.theAggregate.aReal   = 3.14;
            aggr3.theAggregate.aString = "hello!";
            aggr3.lastValue            = 99;

            data.dictionary_two.Add(2, aggr1);
            data.dictionary_two.Add(3, aggr2);
            data.dictionary_two.Add(4, aggr3);

            mtest.Idu_one du1 = new mtest.du_one();
            du1.setCurrentVariant(mtest.du_one_variants.two);
            du1.Data.Add(-100.001);
            du1.Data.Add(-200.002);
            du1.Data.Add(-300.003);

            mtest.Idu_one du2 = new mtest.du_one();
            du2.setCurrentVariant(mtest.du_one_variants.two);
            du2.Data.Add(-100.001);
            du2.Data.Add(-200.002);
            du2.Data.Add(-300.003);

            mtest.Idu_one du3 = new mtest.du_one();
            du3.setCurrentVariant(mtest.du_one_variants.two);
            du3.Data.Add(-100.001);
            du3.Data.Add(-200.002);
            du3.Data.Add(-300.003);

            data.dictionary_three.Add(-5, du1);
            data.dictionary_three.Add(-6, du2);
            data.dictionary_three.Add(-7, du3);

            mtest.BasicTypes bt = new mtest.BasicTypes();
            bt.anInt   = -99;
            bt.aString = "someName";

            mtest.BasicTypes bt2 = new mtest.BasicTypes();
            bt2.anInt   = -98;
            bt2.aString = "otherName";

            data.dictionary_four.Add("someName", bt);
            data.dictionary_four.Add("otherName", bt2);

            return(data);
        }