示例#1
0
        internal static void twoways(Communicator communicator, IMyClassPrx p)
        {
            {
                var i = Enumerable.Range(0, Length).Select(x => (byte)x).ToArray();
                var(r, o) = p.opAByteS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (byte)x).ToList();
                var(r, o) = p.opLByteS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                var(r, o) = p.opKByteS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                var(r, o) = p.opQByteS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                var(r, o) = p.opSByteS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => x % 1 == 1).ToArray();
                var(r, o) = p.opABoolS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => x % 1 == 1).ToList();
                var(r, o) = p.opLBoolS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <bool>(Enumerable.Range(0, Length).Select(x => x % 1 == 1).ToArray());
                var(r, o) = p.opKBoolS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <bool>(Enumerable.Range(0, Length).Select(x => x % 1 == 1).ToArray());
                var(r, o) = p.opQBoolS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <bool>(Enumerable.Range(0, Length).Select(x => x % 1 == 1).ToArray());
                var(r, o) = p.opSBoolS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (short)x).ToArray();
                var(r, o) = p.opAShortS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (short)x).ToList();
                var(r, o) = p.opLShortS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                var(r, o) = p.opKShortS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                var(r, o) = p.opQShortS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                var(r, o) = p.opSShortS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).ToArray();
                var(r, o) = p.opAIntS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).ToList();
                var(r, o) = p.opLIntS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <int>(Enumerable.Range(0, Length).ToArray());
                var(r, o) = p.opKIntS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <int>(Enumerable.Range(0, Length).ToArray());
                var(r, o) = p.opQIntS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <int>(Enumerable.Range(0, Length).ToArray());
                var(r, o) = p.opSIntS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (long)x).ToArray();
                var(r, o) = p.opALongS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (long)x).ToList();
                var(r, o) = p.opLLongS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                var(r, o) = p.opKLongS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                var(r, o) = p.opQLongS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                var(r, o) = p.opSLongS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (float)x).ToArray();
                var(r, o) = p.opAFloatS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (float)x).ToList();
                var(r, o) = p.opLFloatS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                var(r, o) = p.opKFloatS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                var(r, o) = p.opQFloatS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                var(r, o) = p.opSFloatS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (double)x).ToArray();
                var(r, o) = p.opADoubleS(i);
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(r.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (double)x).ToList();
                var(r, o) = p.opLDoubleS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                var(r, o) = p.opKDoubleS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                var(r, o) = p.opQDoubleS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                var(r, o) = p.opSDoubleS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray();
                var(r, o) = p.opAStringS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => x.ToString()).ToList();
                var(r, o) = p.opLStringS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                var(r, o) = p.opKStringS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                var(r, o) = p.opQStringS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                var(r, o) = p.opSStringS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CV(x) as AnyClass).ToArray();
                var(r, o) = p.opAObjectS(i);
                TestHelper.Assert(r.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CV(x) as AnyClass).ToList <AnyClass?>();
                var(r, o) = p.opLObjectS(i);
                TestHelper.Assert(r.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(
                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray();
                var(r, o) = p.opAObjectPrxS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(
                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToList <IObjectPrx?>();
                var(r, o) = p.opLObjectPrxS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                         x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                var(r, o) = p.opKObjectPrxS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                var(r, o) = p.opQObjectPrxS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                var(r, o) = p.opSObjectPrxS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new S(x)).ToArray();
                var(r, o) = p.opAStructS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new S(x)).ToList();
                var(r, o) = p.opLStructS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                var(r, o) = p.opKStructS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                var(r, o) = p.opQStructS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                var(r, o) = p.opSStructS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new SD(x)).ToArray();
                var(r, o) = p.opAStructSD(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new SD(x)).ToList();
                var(r, o) = p.opLStructSD(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <SD>(Enumerable.Range(0, Length).Select(x => new SD(x)).ToList());
                var(r, o) = p.opKStructSD(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <SD>(Enumerable.Range(0, Length).Select(x => new SD(x)).ToList());
                var(r, o) = p.opQStructSD(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <SD>(Enumerable.Range(0, Length).Select(x => new SD(x)).ToList());
                var(r, o) = p.opSStructSD(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CV(x)).ToArray();
                var(r, o) = p.opACVS(i);
                TestHelper.Assert(r.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CV(x)).ToList <CV?>();
                var(r, o) = p.opLCVS(i);
                TestHelper.Assert(r.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CR(new CV(x))).ToArray();
                var(r, o) = p.opACRS(i);
                TestHelper.Assert(r.SequenceEqual(i, new CRComparer()));
                TestHelper.Assert(o.SequenceEqual(i, new CRComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CR(new CV(x))).ToList <CR?>();
                var(r, o) = p.opLCRS(i);
                TestHelper.Assert(r.SequenceEqual(i, new CRComparer()));
                TestHelper.Assert(o.SequenceEqual(i, new CRComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToArray();
                var(r, o) = p.opAEnS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToList();
                var(r, o) = p.opLEnS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <En>(Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToList());
                var(r, o) = p.opKEnS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <En>(Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToList());
                var(r, o) = p.opQEnS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <En>(Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToList());
                var(r, o) = p.opSEnS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(
                    x => IIPrx.Parse(x.ToString(), communicator)).ToArray();
                var(r, o) = p.opAIPrxS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(
                    x => IIPrx.Parse(x.ToString(), communicator)).ToList <IIPrx?>();
                var(r, o) = p.opLIPrxS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new LinkedList <IIPrx?>(Enumerable.Range(0, Length).Select(
                                                    x => IIPrx.Parse(x.ToString(), communicator)).ToList());
                var(r, o) = p.opKIPrxS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Queue <IIPrx?>(Enumerable.Range(0, Length).Select(
                                               x => IIPrx.Parse(x.ToString(), communicator)).ToList());
                var(r, o) = p.opQIPrxS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Stack <IIPrx?>(Enumerable.Range(0, Length).Select(
                                               x => IIPrx.Parse(x.ToString(), communicator)).ToList());
                var(r, o) = p.opSIPrxS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Custom <int>(Enumerable.Range(0, Length).ToList());
                var(r, o) = p.opCustomIntS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Custom <CV?>(
                    Enumerable.Range(0, Length).Select(x => new CV(x)).ToList <CV?>());
                var(r, o) = p.opCustomCVS(i);
                TestHelper.Assert(r.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = new Custom <Custom <int> >();
                for (int c = 0; c < Length; ++c)
                {
                    i.Add(new Custom <int>(Enumerable.Range(0, Length).ToList()));
                }
                var(r, o) = p.opCustomIntSS(i);
                TestHelper.Assert(r.SequenceEqual(i));
                TestHelper.Assert(o.SequenceEqual(i));
            }

            {
                var i = new Custom <Custom <CV?> >();
                for (int c = 0; c < Length; ++c)
                {
                    i.Add(new Custom <CV?>(Enumerable.Range(0, Length).Select(
                                               x => new CV(x)).ToList <CV?>()));
                }
                var(r, o) = p.opCustomCVSS(i);
                for (int c = 0; c < Length; ++c)
                {
                    TestHelper.Assert(r[c].SequenceEqual(i[c], new CVComparer()));
                    TestHelper.Assert(o[c].SequenceEqual(i[c], new CVComparer()));
                }
            }

            {
                Serialize.Small i = new Serialize.Small();
                i.i = 99;
                Serialize.Small o;
                Serialize.Small r;

                try
                {
                    (r, o) = p.opSerialSmallCSharp(i);

                    TestHelper.Assert(o.i == 99);
                    TestHelper.Assert(r.i == 99);
                }
                catch (OperationNotExistException)
                {
                    // OK, talking to non-C# server.
                }
            }

            {
                Serialize.Large i = new Serialize.Large();
                i.d1  = 1.0;
                i.d2  = 2.0;
                i.d3  = 3.0;
                i.d4  = 4.0;
                i.d5  = 5.0;
                i.d6  = 6.0;
                i.d7  = 7.0;
                i.d8  = 8.0;
                i.d9  = 9.0;
                i.d10 = 10.0;
                i.d11 = 11.0;
                i.s1  = Serialize.Large.LargeString;
                Serialize.Large o;
                Serialize.Large r;

                try
                {
                    (r, o) = p.opSerialLargeCSharp(i);
                    TestHelper.Assert(o.d1 == 1.0);
                    TestHelper.Assert(o.d2 == 2.0);
                    TestHelper.Assert(o.d3 == 3.0);
                    TestHelper.Assert(o.d4 == 4.0);
                    TestHelper.Assert(o.d5 == 5.0);
                    TestHelper.Assert(o.d6 == 6.0);
                    TestHelper.Assert(o.d7 == 7.0);
                    TestHelper.Assert(o.d8 == 8.0);
                    TestHelper.Assert(o.d9 == 9.0);
                    TestHelper.Assert(o.d10 == 10.0);
                    TestHelper.Assert(o.d11 == 11.0);
                    TestHelper.Assert(o.s1 == Serialize.Large.LargeString);
                    TestHelper.Assert(r.d1 == 1.0);
                    TestHelper.Assert(r.d2 == 2.0);
                    TestHelper.Assert(r.d3 == 3.0);
                    TestHelper.Assert(r.d4 == 4.0);
                    TestHelper.Assert(r.d5 == 5.0);
                    TestHelper.Assert(r.d6 == 6.0);
                    TestHelper.Assert(r.d7 == 7.0);
                    TestHelper.Assert(r.d8 == 8.0);
                    TestHelper.Assert(r.d9 == 9.0);
                    TestHelper.Assert(r.d10 == 10.0);
                    TestHelper.Assert(r.d11 == 11.0);
                    TestHelper.Assert(r.s1 == Serialize.Large.LargeString);
                }
                catch (OperationNotExistException)
                {
                    // OK, talking to non-C# server.
                }
            }

            {
                Serialize.Struct i = new Serialize.Struct();
                i.o  = null;
                i.o2 = i;
                i.s  = null;
                i.s2 = "Hello";
                Serialize.Struct o;
                Serialize.Struct r;

                try
                {
                    (r, o) = p.opSerialStructCSharp(i);
                    TestHelper.Assert(o.o == null);
                    TestHelper.Assert(o.o2 != null);
                    TestHelper.Assert(((Serialize.Struct)(o.o2)).o == null);
                    TestHelper.Assert(((Serialize.Struct)(o.o2)).o2 == o.o2);
                    TestHelper.Assert(o.s == null);
                    TestHelper.Assert(o.s2 !.Equals("Hello"));
                    TestHelper.Assert(r.o == null);
                    TestHelper.Assert(r.o2 != null);
                    TestHelper.Assert(((Serialize.Struct)(r.o2)).o == null);
                    TestHelper.Assert(((Serialize.Struct)(r.o2)).o2 == r.o2);
                    TestHelper.Assert(r.s == null);
                    TestHelper.Assert(r.s2 !.Equals("Hello"));
                }
                catch (OperationNotExistException)
                {
                    // OK, talking to non-C# server.
                }
            }
        }
示例#2
0
        internal static void twowaysAMI(Communicator communicator, IMyClassPrx p)
        {
            {
                var i = Enumerable.Range(0, Length).Select(x => (byte)x).ToArray();
                var r = p.opAByteSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (byte)x).ToList();
                var r = p.opLByteSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                var r = p.opKByteSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                var r = p.opQByteSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                var r = p.opSByteSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                var r = p.opCByteSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToArray();
                var r = p.opABoolSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToList();
                var r = p.opLBoolSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <bool>(Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToArray());
                var r = p.opKBoolSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <bool>(Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToArray());
                var r = p.opQBoolSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <bool>(Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToArray());
                var r = p.opSBoolSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <bool>(Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToArray());
                var r = p.opCBoolSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (short)x).ToArray();
                var r = p.opAShortSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (short)x).ToList();
                var r = p.opLShortSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                var r = p.opKShortSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                var r = p.opQShortSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                var r = p.opSShortSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                var r = p.opCShortSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).ToArray();
                var r = p.opAIntSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).ToList();
                var r = p.opLIntSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <int>(Enumerable.Range(0, Length).ToArray());
                var r = p.opKIntSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <int>(Enumerable.Range(0, Length).ToArray());
                var r = p.opQIntSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <int>(Enumerable.Range(0, Length).ToArray());
                var r = p.opSIntSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <int>(Enumerable.Range(0, Length).ToArray());
                var r = p.opCIntSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (long)x).ToArray();
                var r = p.opALongSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (long)x).ToList();
                var r = p.opLLongSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                var r = p.opKLongSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                var r = p.opQLongSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                var r = p.opSLongSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                var r = p.opCLongSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (float)x).ToArray();
                var r = p.opAFloatSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (float)x).ToList();
                var r = p.opLFloatSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                var r = p.opKFloatSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                var r = p.opQFloatSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                var r = p.opSFloatSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                var r = p.opCFloatSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (double)x).ToArray();
                var r = p.opADoubleSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (double)x).ToList();
                var r = p.opLDoubleSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                var r = p.opKDoubleSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                var r = p.opQDoubleSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                var r = p.opSDoubleSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                var r = p.opCDoubleSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray();
                var r = p.opAStringSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => x.ToString()).ToList();
                var r = p.opLStringSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                var r = p.opKStringSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                var r = p.opQStringSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                var r = p.opSStringSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                var r = p.opCStringSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CV(x) as AnyClass).ToArray();
                var r = p.opAObjectSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CV(x) as AnyClass).ToList <AnyClass?>();
                var r = p.opLObjectSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = new Custom <AnyClass>(Enumerable.Range(0, Length).Select(
                                                  x => new CV(x) as AnyClass).ToArray());
                var r = p.opCObjectSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(
                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray();
                var r = p.opAObjectPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(
                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToList <IObjectPrx?>();
                var r = p.opLObjectPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                         x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                var r = p.opKObjectPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                var r = p.opQObjectPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                var r = p.opSObjectPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                     x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                var r = p.opCObjectPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new S(x)).ToArray();
                var r = p.opAStructSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new S(x)).ToList();
                var r = p.opLStructSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                var r = p.opKStructSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                var r = p.opQStructSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                var r = p.opSStructSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                var r = p.opCStructSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CV(x)).ToArray();
                var r = p.opACVSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CV(x)).ToList <CV?>();
                var r = p.opLCVSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(
                    x => IIPrx.Parse(x.ToString(), communicator)).ToArray();
                var r = p.opAIPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(
                    x => IIPrx.Parse(x.ToString(), communicator)).ToList <IIPrx?>();
                var r = p.opLIPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <IIPrx?>(Enumerable.Range(0, Length).Select(
                                                    x => IIPrx.Parse(x.ToString(), communicator)).ToArray());
                var r = p.opKIPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <IIPrx?>(Enumerable.Range(0, Length).Select(
                                               x => IIPrx.Parse(x.ToString(), communicator)).ToArray());
                var r = p.opQIPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <IIPrx?>(Enumerable.Range(0, Length).Select(
                                               x => IIPrx.Parse(x.ToString(), communicator)).ToArray());
                var r = p.opSIPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <IIPrx?>(Enumerable.Range(0, Length).Select(
                                                x => IIPrx.Parse(x.ToString(), communicator)).ToArray());
                var r = p.opCIPrxSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CR(new CV(x))).ToArray();
                var r = p.opACRSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i, new CRComparer()));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i, new CRComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CR(new CV(x))).ToList <CR?>();
                var r = p.opLCRSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i, new CRComparer()));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i, new CRComparer()));
            }

            {
                var i = new Custom <CR>(Enumerable.Range(0, Length).Select(
                                            x => new CR(new CV(x))).ToArray());
                var r = p.opLCRSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i, new CRComparer()));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i, new CRComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToArray();
                var r = p.opAEnSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToList();
                var r = p.opLEnSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <En>(Enumerable.Range(0, Length).Select(
                                                x => (En)(x % 3)).ToArray());
                var r = p.opKEnSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <En>(Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToArray());
                var r = p.opQEnSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <En>(Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToArray());
                var r = p.opSEnSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <En>(Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToArray());
                var r = p.opCEnSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <int>(Enumerable.Range(0, Length).ToList());
                var r = p.opCustomIntSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <CV?>(
                    Enumerable.Range(0, Length).Select(x => new CV(x)).ToList <CV?>());
                var r = p.opCustomCVSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = new Custom <Custom <int> >();
                for (int c = 0; c < Length; ++c)
                {
                    i.Add(new Custom <int>(Enumerable.Range(0, Length).ToList()));
                }
                var r = p.opCustomIntSSAsync(i).Result;
                TestHelper.Assert(r.o.SequenceEqual(i));
                TestHelper.Assert(r.ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <Custom <CV?> >();
                for (int c = 0; c < Length; ++c)
                {
                    i.Add(new Custom <CV?>(Enumerable.Range(0, Length).Select(
                                               x => new CV(x)).ToList <CV?>()));
                }
                var r = p.opCustomCVSSAsync(i).Result;
                for (int c = 0; c < Length; ++c)
                {
                    TestHelper.Assert(r.o[c].SequenceEqual(i[c], new CVComparer()));
                    TestHelper.Assert(r.ReturnValue[c].SequenceEqual(i[c], new CVComparer()));
                }
            }

            {
                var i = new Serialize.Small();
                i.i = 99;

                (Serialize.Small ReturnValue, Serialize.Small o) = p.opSerialSmallCSharpAsync(i).Result;
                TestHelper.Assert(o.i == 99);
                TestHelper.Assert(ReturnValue.i == 99);
            }

            {
                var i = new Serialize.Large();
                i.d1  = 1.0;
                i.d2  = 2.0;
                i.d3  = 3.0;
                i.d4  = 4.0;
                i.d5  = 5.0;
                i.d6  = 6.0;
                i.d7  = 7.0;
                i.d8  = 8.0;
                i.d9  = 9.0;
                i.d10 = 10.0;
                i.d11 = 11.0;
                i.s1  = Serialize.Large.LargeString;

                (Serialize.Large ReturnValue, Serialize.Large o) = p.opSerialLargeCSharpAsync(i).Result;
                TestHelper.Assert(o.d1 == 1.0);
                TestHelper.Assert(o.d2 == 2.0);
                TestHelper.Assert(o.d3 == 3.0);
                TestHelper.Assert(o.d4 == 4.0);
                TestHelper.Assert(o.d5 == 5.0);
                TestHelper.Assert(o.d6 == 6.0);
                TestHelper.Assert(o.d7 == 7.0);
                TestHelper.Assert(o.d8 == 8.0);
                TestHelper.Assert(o.d9 == 9.0);
                TestHelper.Assert(o.d10 == 10.0);
                TestHelper.Assert(o.d11 == 11.0);
                TestHelper.Assert(o.s1 == Serialize.Large.LargeString);

                TestHelper.Assert(ReturnValue.d1 == 1.0);
                TestHelper.Assert(ReturnValue.d2 == 2.0);
                TestHelper.Assert(ReturnValue.d3 == 3.0);
                TestHelper.Assert(ReturnValue.d4 == 4.0);
                TestHelper.Assert(ReturnValue.d5 == 5.0);
                TestHelper.Assert(ReturnValue.d6 == 6.0);
                TestHelper.Assert(ReturnValue.d7 == 7.0);
                TestHelper.Assert(ReturnValue.d8 == 8.0);
                TestHelper.Assert(ReturnValue.d9 == 9.0);
                TestHelper.Assert(ReturnValue.d10 == 10.0);
                TestHelper.Assert(ReturnValue.d11 == 11.0);
                TestHelper.Assert(ReturnValue.s1 == Serialize.Large.LargeString);
            }

            {
                var i = new Serialize.Struct();
                i.o  = null;
                i.o2 = i;
                i.s  = null;
                i.s2 = "Hello";

                (Serialize.Struct ReturnValue, Serialize.Struct o) = p.opSerialStructCSharpAsync(i).Result;
                TestHelper.Assert(o.o == null);
                TestHelper.Assert(o.o2 == o);
                TestHelper.Assert(o.s == null);
                TestHelper.Assert(o.s2 == "Hello");

                TestHelper.Assert(ReturnValue.o == null);
                TestHelper.Assert(ReturnValue.o2 == ReturnValue);
                TestHelper.Assert(ReturnValue.s == null);
                TestHelper.Assert(ReturnValue.s2 == "Hello");
            }
        }
示例#3
0
文件: MyClassI.cs 项目: wandec/ice
 public (Serialize.Large, Serialize.Large) opSerialLargeCSharp(Serialize.Large i, Current current) => (i, i);
示例#4
0
        internal static void Run(Communicator communicator, IMyClassPrx p)
        {
            {
                byte[] i = Enumerable.Range(0, Length).Select(x => (byte)x).ToArray();
                (byte[] ReturnValue, byte[] o) = p.OpAByteSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (byte)x).ToList();
                (List <byte> ReturnValue, List <byte> o) = p.OpLByteSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                (LinkedList <byte> ReturnValue, LinkedList <byte> o) = p.OpKByteSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                (Queue <byte> ReturnValue, Queue <byte> o) = p.OpQByteSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                (Stack <byte> ReturnValue, Stack <byte> o) = p.OpSByteSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <byte>(Enumerable.Range(0, Length).Select(x => (byte)x).ToArray());
                (Custom <byte> ReturnValue, Custom <byte> o) = p.OpCByteSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                bool[] i = Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToArray();
                (bool[] ReturnValue, bool[] o) = p.OpABoolSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToList();
                (List <bool> ReturnValue, List <bool> o) = p.OpLBoolSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <bool>(Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToArray());
                (LinkedList <bool> ReturnValue, LinkedList <bool> o) = p.OpKBoolSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <bool>(Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToArray());
                (Queue <bool> ReturnValue, Queue <bool> o) = p.OpQBoolSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <bool>(Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToArray());
                (Stack <bool> ReturnValue, Stack <bool> o) = p.OpSBoolSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <bool>(Enumerable.Range(0, Length).Select(x => x % 2 == 1).ToArray());
                (Custom <bool> ReturnValue, Custom <bool> o) = p.OpCBoolSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                short[]? i = Enumerable.Range(0, Length).Select(x => (short)x).ToArray();
                (short[] ReturnValue, short[] o) = p.OpAShortSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (short)x).ToList();
                (List <short> ReturnValue, List <short> o) = p.OpLShortSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                (LinkedList <short> ReturnValue, LinkedList <short> o) = p.OpKShortSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                (Queue <short> ReturnValue, Queue <short> o) = p.OpQShortSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                (Stack <short> ReturnValue, Stack <short> o) = p.OpSShortSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <short>(Enumerable.Range(0, Length).Select(x => (short)x).ToArray());
                (Custom <short> ReturnValue, Custom <short> o) = p.OpCShortSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                int[] i = Enumerable.Range(0, Length).ToArray();
                (int[] ReturnValue, int[] o) = p.OpAIntSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).ToList();
                (List <int> ReturnValue, List <int> o) = p.OpLIntSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <int>(Enumerable.Range(0, Length).ToArray());
                (LinkedList <int> ReturnValue, LinkedList <int> o) = p.OpKIntSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <int>(Enumerable.Range(0, Length).ToArray());
                (Queue <int> ReturnValue, Queue <int> o) = p.OpQIntSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <int>(Enumerable.Range(0, Length).ToArray());
                (Stack <int> ReturnValue, Stack <int> o) = p.OpSIntSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <int>(Enumerable.Range(0, Length).ToArray());
                (Custom <int> ReturnValue, Custom <int> o) = p.OpCIntSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                long[]? i = Enumerable.Range(0, Length).Select(x => (long)x).ToArray();
                (long[] ReturnValue, long[] o) = p.OpALongSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (long)x).ToList();
                (List <long> ReturnValue, List <long> o) = p.OpLLongSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                (LinkedList <long> ReturnValue, LinkedList <long> o) = p.OpKLongSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                (Queue <long> ReturnValue, Queue <long> o) = p.OpQLongSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                (Stack <long> ReturnValue, Stack <long> o) = p.OpSLongSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <long>(Enumerable.Range(0, Length).Select(x => (long)x).ToArray());
                (Custom <long> ReturnValue, Custom <long> o) = p.OpCLongSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                float[] i = Enumerable.Range(0, Length).Select(x => (float)x).ToArray();
                (float[] ReturnValue, float[] o) = p.OpAFloatSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (float)x).ToList();
                (List <float> ReturnValue, List <float> o) = p.OpLFloatSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                (LinkedList <float> ReturnValue, LinkedList <float> o) = p.OpKFloatSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                (Queue <float> ReturnValue, Queue <float> o) = p.OpQFloatSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                (Stack <float> ReturnValue, Stack <float> o) = p.OpSFloatSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <float>(Enumerable.Range(0, Length).Select(x => (float)x).ToArray());
                (Custom <float> ReturnValue, Custom <float> o) = p.OpCFloatSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                double[] i = Enumerable.Range(0, Length).Select(x => (double)x).ToArray();
                (double[] ReturnValue, double[] o) = p.OpADoubleSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (double)x).ToList();
                (List <double> ReturnValue, List <double> o) = p.OpLDoubleSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                (LinkedList <double> ReturnValue, LinkedList <double> o) = p.OpKDoubleSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                (Queue <double> ReturnValue, Queue <double> o) = p.OpQDoubleSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                (Stack <double> ReturnValue, Stack <double> o) = p.OpSDoubleSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <double>(Enumerable.Range(0, Length).Select(x => (double)x).ToArray());
                (Custom <double> ReturnValue, Custom <double> o) = p.OpCDoubleSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                string[] i = Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray();
                (string[] ReturnValue, string[] o) = p.OpAStringSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => x.ToString()).ToList();
                (List <string> ReturnValue, List <string> o) = p.OpLStringSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                (LinkedList <string> ReturnValue, LinkedList <string> o) = p.OpKStringSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                (Queue <string> ReturnValue, Queue <string> o) = p.OpQStringSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                (Stack <string> ReturnValue, Stack <string> o) = p.OpSStringSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <string>(Enumerable.Range(0, Length).Select(x => x.ToString()).ToArray());
                (Custom <string> ReturnValue, Custom <string> o) = p.OpCStringSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                AnyClass[] i = Enumerable.Range(0, Length).Select(x => new CV(x) as AnyClass).ToArray();
                (AnyClass?[] ReturnValue, AnyClass?[] o) = p.OpAObjectSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CV(x) as AnyClass).ToList <AnyClass?>();
                (List <AnyClass?> ReturnValue, List <AnyClass?> o) = p.OpLObjectSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = new Custom <AnyClass>(Enumerable.Range(0, Length).Select(
                                                  x => new CV(x) as AnyClass).ToArray());
                (Custom <AnyClass?> ReturnValue, Custom <AnyClass?> o) = p.OpCObjectSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                IObjectPrx[]? i = Enumerable.Range(0, Length).Select(
                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray();
                (IObjectPrx?[] ReturnValue, IObjectPrx?[] o) = p.OpAObjectPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(
                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToList <IObjectPrx?>();
                (List <IObjectPrx?> ReturnValue, List <IObjectPrx?> o) = p.OpLObjectPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                         x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                (LinkedList <IObjectPrx?> ReturnValue, LinkedList <IObjectPrx?> o) = p.OpKObjectPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                (Queue <IObjectPrx?> ReturnValue, Queue <IObjectPrx?> o) = p.OpQObjectPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                    x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                (Stack <IObjectPrx?> ReturnValue, Stack <IObjectPrx?> o) = p.OpSObjectPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <IObjectPrx?>(Enumerable.Range(0, Length).Select(
                                                     x => IObjectPrx.Parse(x.ToString(), communicator)).ToArray());
                (Custom <IObjectPrx?> ReturnValue, Custom <IObjectPrx?> o) = p.OpCObjectPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                S[]? i = Enumerable.Range(0, Length).Select(x => new S(x)).ToArray();
                (S[] ReturnValue, S[] o) = p.OpAStructSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new S(x)).ToList();
                (List <S> ReturnValue, List <S> o) = p.OpLStructSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                (LinkedList <S> ReturnValue, LinkedList <S> o) = p.OpKStructSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                (Queue <S> ReturnValue, Queue <S> o) = p.OpQStructSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                (Stack <S> ReturnValue, Stack <S> o) = p.OpSStructSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <S>(Enumerable.Range(0, Length).Select(x => new S(x)).ToArray());
                (Custom <S> ReturnValue, Custom <S> o) = p.OpCStructSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                CV[] i = Enumerable.Range(0, Length).Select(x => new CV(x)).ToArray();
                (CV?[] ReturnValue, CV?[] o) = p.OpACVSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CV(x)).ToList <CV?>();
                (List <CV?> ReturnValue, List <CV?> o) = p.OpLCVSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                IIPrx[] i = Enumerable.Range(0, Length).Select(
                    x => IIPrx.Parse(x.ToString(), communicator)).ToArray();
                (IIPrx?[] ReturnValue, IIPrx?[] o) = p.OpAIPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(
                    x => IIPrx.Parse(x.ToString(), communicator)).ToList <IIPrx?>();
                (List <IIPrx?> ReturnValue, List <IIPrx?> o) = p.OpLIPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <IIPrx?>(Enumerable.Range(0, Length).Select(
                                                    x => IIPrx.Parse(x.ToString(), communicator)).ToArray());
                (LinkedList <IIPrx?> ReturnValue, LinkedList <IIPrx?> o) = p.OpKIPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <IIPrx?>(Enumerable.Range(0, Length).Select(
                                               x => IIPrx.Parse(x.ToString(), communicator)).ToArray());
                (Queue <IIPrx?> ReturnValue, Queue <IIPrx?> o) = p.OpQIPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <IIPrx?>(Enumerable.Range(0, Length).Select(
                                               x => IIPrx.Parse(x.ToString(), communicator)).ToArray());
                (Stack <IIPrx?> ReturnValue, Stack <IIPrx?> o) = p.OpSIPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <IIPrx?>(Enumerable.Range(0, Length).Select(
                                                x => IIPrx.Parse(x.ToString(), communicator)).ToArray());
                (Custom <IIPrx?> ReturnValue, Custom <IIPrx?> o) = p.OpCIPrxSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                CR[]? i = Enumerable.Range(0, Length).Select(x => new CR(new CV(x))).ToArray();
                (CR?[] ReturnValue, CR?[] o) = p.OpACRSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i, new CRComparer()));
                TestHelper.Assert(ReturnValue.SequenceEqual(i, new CRComparer()));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => new CR(new CV(x))).ToList <CR?>();
                (List <CR?> ReturnValue, List <CR?> o) = p.OpLCRSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i, new CRComparer()));
                TestHelper.Assert(ReturnValue.SequenceEqual(i, new CRComparer()));
            }

            {
                var i = new Custom <CR>(Enumerable.Range(0, Length).Select(
                                            x => new CR(new CV(x))).ToArray());
                (List <CR?> ReturnValue, List <CR?> o) = p.OpLCRSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i, new CRComparer()));
                TestHelper.Assert(ReturnValue.SequenceEqual(i, new CRComparer()));
            }

            {
                En[] i = Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToArray();
                (En[] ReturnValue, En[] o) = p.OpAEnSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToList();
                (List <En> ReturnValue, List <En> o) = p.OpLEnSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new LinkedList <En>(Enumerable.Range(0, Length).Select(
                                                x => (En)(x % 3)).ToArray());
                (LinkedList <En> ReturnValue, LinkedList <En> o) = p.OpKEnSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Queue <En>(Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToArray());
                (Queue <En> ReturnValue, Queue <En> o) = p.OpQEnSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Stack <En>(Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToArray());
                (Stack <En> ReturnValue, Stack <En> o) = p.OpSEnSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <En>(Enumerable.Range(0, Length).Select(x => (En)(x % 3)).ToArray());
                (Custom <En> ReturnValue, Custom <En> o) = p.OpCEnSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <int>(Enumerable.Range(0, Length).ToList());
                (Custom <int> ReturnValue, Custom <int> o) = p.OpCustomIntSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <CV?>(
                    Enumerable.Range(0, Length).Select(x => new CV(x)).ToList <CV?>());
                (Custom <CV?> ReturnValue, Custom <CV?> o) = p.OpCustomCVSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i, new CVComparer()));
                TestHelper.Assert(ReturnValue.SequenceEqual(i, new CVComparer()));
            }

            {
                var i = new Custom <Custom <int> >();
                for (int c = 0; c < Length; ++c)
                {
                    i.Add(new Custom <int>(Enumerable.Range(0, Length).ToList()));
                }
                (Custom <Custom <int> > ReturnValue, Custom <Custom <int> > o) = p.OpCustomIntSSAsync(i).Result;
                TestHelper.Assert(o.SequenceEqual(i));
                TestHelper.Assert(ReturnValue.SequenceEqual(i));
            }

            {
                var i = new Custom <Custom <CV?> >();
                for (int c = 0; c < Length; ++c)
                {
                    i.Add(new Custom <CV?>(Enumerable.Range(0, Length).Select(
                                               x => new CV(x)).ToList <CV?>()));
                }
                (Custom <Custom <CV?> > ReturnValue, Custom <Custom <CV?> > o) = p.OpCustomCVSSAsync(i).Result;
                for (int c = 0; c < Length; ++c)
                {
                    TestHelper.Assert(o[c].SequenceEqual(i[c], new CVComparer()));
                    TestHelper.Assert(ReturnValue[c].SequenceEqual(i[c], new CVComparer()));
                }
            }

            {
                var i = new Serialize.Small();
                i.i = 99;

                (Serialize.Small ReturnValue, Serialize.Small o) = p.OpSerialSmallCSharpAsync(i).Result;
                TestHelper.Assert(o.i == 99);
                TestHelper.Assert(ReturnValue.i == 99);
            }

            {
                var i = new Serialize.Large();
                i.d1    = 1.0;
                i.d2    = 2.0;
                i.d3    = 3.0;
                i.d4    = 4.0;
                i.d5    = 5.0;
                i.d6    = 6.0;
                i.d7    = 7.0;
                i.d8    = 8.0;
                i.d9    = 9.0;
                i.d10   = 10.0;
                i.d11   = 11.0;
                i.proxy = p;
                i.s1    = Serialize.Large.LargeString;

                (Serialize.Large ReturnValue, Serialize.Large o) = p.OpSerialLargeCSharpAsync(i).Result;
                TestHelper.Assert(o.d1 == 1.0);
                TestHelper.Assert(o.d2 == 2.0);
                TestHelper.Assert(o.d3 == 3.0);
                TestHelper.Assert(o.d4 == 4.0);
                TestHelper.Assert(o.d5 == 5.0);
                TestHelper.Assert(o.d6 == 6.0);
                TestHelper.Assert(o.d7 == 7.0);
                TestHelper.Assert(o.d8 == 8.0);
                TestHelper.Assert(o.d9 == 9.0);
                TestHelper.Assert(o.d10 == 10.0);
                TestHelper.Assert(o.d11 == 11.0);
                TestHelper.Assert(o.proxy !.Equals(p));
                TestHelper.Assert(o.s1 == Serialize.Large.LargeString);

                TestHelper.Assert(ReturnValue.d1 == 1.0);
                TestHelper.Assert(ReturnValue.d2 == 2.0);
                TestHelper.Assert(ReturnValue.d3 == 3.0);
                TestHelper.Assert(ReturnValue.d4 == 4.0);
                TestHelper.Assert(ReturnValue.d5 == 5.0);
                TestHelper.Assert(ReturnValue.d6 == 6.0);
                TestHelper.Assert(ReturnValue.d7 == 7.0);
                TestHelper.Assert(ReturnValue.d8 == 8.0);
                TestHelper.Assert(ReturnValue.d9 == 9.0);
                TestHelper.Assert(ReturnValue.d10 == 10.0);
                TestHelper.Assert(ReturnValue.d11 == 11.0);
                TestHelper.Assert(ReturnValue.proxy !.Equals(p));
                TestHelper.Assert(ReturnValue.s1 == Serialize.Large.LargeString);
            }

            {
                var i = new Serialize.Struct();
                i.o  = null;
                i.o2 = i;
                i.s  = null;
                i.s2 = "Hello";

                (Serialize.Struct ReturnValue, Serialize.Struct o) = p.OpSerialStructCSharpAsync(i).Result;
                TestHelper.Assert(o.o == null);
                TestHelper.Assert(o.o2 == o);
                TestHelper.Assert(o.s == null);
                TestHelper.Assert(o.s2 == "Hello");

                TestHelper.Assert(ReturnValue.o == null);
                TestHelper.Assert(ReturnValue.o2 == ReturnValue);
                TestHelper.Assert(ReturnValue.s == null);
                TestHelper.Assert(ReturnValue.s2 == "Hello");
            }
        }