// // Copyright (c) ZeroC, Inc. All rights reserved. // using System.Diagnostics; using System.Collections.Generic; namespace Ice { namespace seqMapping { public class TwowaysAMI { private static void test(bool b) { if(!b) { throw new System.SystemException(); } } private class CallbackBase { internal CallbackBase() { _called = false; } public virtual void check() { lock(this) { while(!_called) { System.Threading.Monitor.Wait(this); } _called = false; } } public virtual void called() { lock(this) { Debug.Assert(!_called); _called = true; System.Threading.Monitor.Pulse(this); } } private bool _called; } private class Callback { public void opAByteSI(Ice.AsyncResult result) { byte[] i =(byte[])result.AsyncState; byte[] o; byte[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAByteS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLByteSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLByteS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKByteSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKByteS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQByteSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQByteS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSByteSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSByteS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opABoolSI(Ice.AsyncResult result) { bool[] i =(bool[])result.AsyncState; bool[] o; bool[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opABoolS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLBoolSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLBoolS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKBoolSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKBoolS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQBoolSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQBoolS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSBoolSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSBoolS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opAShortSI(Ice.AsyncResult result) { short[] i =(short[])result.AsyncState; short[] o; short[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAShortS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLShortSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLShortS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKShortSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKShortS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQShortSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQShortS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSShortSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSShortS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opAIntSI(Ice.AsyncResult result) { int[] i =(int[])result.AsyncState; int[] o; int[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAIntS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLIntSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLIntS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKIntSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKIntS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQIntSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQIntS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSIntSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSIntS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opALongSI(Ice.AsyncResult result) { long[] i =(long[])result.AsyncState; long[] o; long[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opALongS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLLongSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLLongS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKLongSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKLongS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQLongSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQLongS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSLongSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSLongS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opAFloatSI(Ice.AsyncResult result) { float[] i =(float[])result.AsyncState; float[] o; float[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAFloatS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLFloatSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLFloatS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKFloatSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKFloatS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQFloatSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQFloatS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSFloatSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSFloatS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opADoubleSI(Ice.AsyncResult result) { double[] i =(double[])result.AsyncState; double[] o; double[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opADoubleS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLDoubleSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLDoubleS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKDoubleSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKDoubleS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQDoubleSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQDoubleS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSDoubleSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSDoubleS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opAStringSI(Ice.AsyncResult result) { string[] i =(string[])result.AsyncState; string[] o; string[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAStringS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLStringSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLStringS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKStringSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKStringS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQStringSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQStringS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSStringSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSStringS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opAObjectSI(Ice.AsyncResult result) { Ice.Value[] i =(Ice.Value[])result.AsyncState; Ice.Value[] o; Ice.Value[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAObjectS(out o, result); System.Collections.IEnumerator eo = o.GetEnumerator(); System.Collections.IEnumerator er = r.GetEnumerator(); foreach(Test.CV obj in i) { eo.MoveNext(); er.MoveNext(); test(obj.i ==((Test.CV)eo.Current).i); test(obj.i ==((Test.CV)er.Current).i); } callback.called(); } public void opLObjectSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLObjectS(out o, result); IEnumerator eo = o.GetEnumerator(); IEnumerator er = r.GetEnumerator(); foreach(Test.CV obj in i) { eo.MoveNext(); er.MoveNext(); test(obj.i ==((Test.CV)eo.Current).i); test(obj.i ==((Test.CV)er.Current).i); } callback.called(); } public void opAObjectPrxSI(Ice.AsyncResult result) { Ice.ObjectPrx[] i =(Ice.ObjectPrx[])result.AsyncState; Ice.ObjectPrx[] o; Ice.ObjectPrx[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAObjectPrxS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLObjectPrxSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLObjectPrxS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKObjectPrxSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKObjectPrxS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQObjectPrxSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQObjectPrxS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSObjectPrxSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSObjectPrxS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opAStructSI(Ice.AsyncResult result) { Test.S[] i =(Test.S[])result.AsyncState; Test.S[] o; Test.S[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAStructS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLStructSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLStructS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKStructSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKStructS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQStructSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQStructS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSStructSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSStructS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opAStructSDI(Ice.AsyncResult result) { Test.SD[] i =(Test.SD[])result.AsyncState; Test.SD[] o; Test.SD[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAStructSD(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLStructSDI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLStructSD(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKStructSDI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKStructSD(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQStructSDI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQStructSD(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSStructSDI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSStructSD(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opACVSI(Ice.AsyncResult result) { Test.CV[] i =(Test.CV[])result.AsyncState; Test.CV[] o; Test.CV[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opACVS(out o, result); System.Collections.IEnumerator eo = o.GetEnumerator(); System.Collections.IEnumerator er = r.GetEnumerator(); foreach(Test.CV obj in i) { eo.MoveNext(); er.MoveNext(); test(obj.i ==((Test.CV)eo.Current).i); test(obj.i ==((Test.CV)er.Current).i); } callback.called(); } public void opLCVSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLCVS(out o, result); IEnumerator eo = o.GetEnumerator(); IEnumerator er = r.GetEnumerator(); foreach(Test.CV obj in i) { eo.MoveNext(); er.MoveNext(); test(obj.i == eo.Current.i); test(obj.i == er.Current.i); } callback.called(); } public void opIPrxSI(Ice.AsyncResult result) { Test.IPrx[] i =(Test.IPrx[])result.AsyncState; Test.IPrx[] o; Test.IPrx[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAIPrxS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLIPrxSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLIPrxS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKIPrxSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKIPrxS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQIPrxSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQIPrxS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSIPrxSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSIPrxS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opACRSI(Ice.AsyncResult result) { Test.CR[] i =(Test.CR[])result.AsyncState; Test.CR[] o; Test.CR[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opACRS(out o, result); System.Collections.IEnumerator eo = o.GetEnumerator(); System.Collections.IEnumerator er = r.GetEnumerator(); foreach(Test.CR obj in i) { eo.MoveNext(); er.MoveNext(); test(obj.v.i ==((Test.CR)eo.Current).v.i); test(obj.v.i ==((Test.CR)er.Current).v.i); } callback.called(); } public void opLCRSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLCRS(out o, result); IEnumerator eo = o.GetEnumerator(); IEnumerator er = r.GetEnumerator(); foreach(Test.CR obj in i) { eo.MoveNext(); er.MoveNext(); test(obj.v.i == eo.Current.v.i); test(obj.v.i == er.Current.v.i); } callback.called(); } public void opAEnSI(Ice.AsyncResult result) { Test.En[] i =(Test.En[])result.AsyncState; Test.En[] o; Test.En[] r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opAEnS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opLEnSI(Ice.AsyncResult result) { List i =(List)result.AsyncState; List o; List r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opLEnS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opKEnSI(Ice.AsyncResult result) { LinkedList i =(LinkedList)result.AsyncState; LinkedList o; LinkedList r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opKEnS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opQEnSI(Ice.AsyncResult result) { Queue i =(Queue)result.AsyncState; Queue o; Queue r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opQEnS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opSEnSI(Ice.AsyncResult result) { Stack i =(Stack)result.AsyncState; Stack o; Stack r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSEnS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opCustomIntSI(Ice.AsyncResult result) { Custom i =(Custom)result.AsyncState; Custom o; Custom r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomIntS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opCustomCVSI(Ice.AsyncResult result) { Custom i =(Custom)result.AsyncState; Custom o; Custom r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomCVS(out o, result); IEnumerator eo = o.GetEnumerator(); IEnumerator er = r.GetEnumerator(); foreach(Test.CV obj in i) { eo.MoveNext(); er.MoveNext(); if(obj == null) { test(eo.Current == null); test(er.Current == null); } else { test(obj.i == eo.Current.i); test(obj.i == er.Current.i); } } callback.called(); } public void opCustomIntSSI(Ice.AsyncResult result) { Custom> i =(Custom>)result.AsyncState; Custom> o; Custom> r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomIntSS(out o, result); test(Ice.CollectionComparer.Equals(i, o)); test(Ice.CollectionComparer.Equals(i, r)); callback.called(); } public void opCustomCVSSI(Ice.AsyncResult result) { Custom> i =(Custom>)result.AsyncState; Custom> o; Custom> r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCustomCVSS(out o, result); IEnumerator> eo = o.GetEnumerator(); IEnumerator> er = r.GetEnumerator(); foreach(Custom s in i) { eo.MoveNext(); er.MoveNext(); IEnumerator io = eo.Current.GetEnumerator(); IEnumerator ir = er.Current.GetEnumerator(); foreach(Test.CV obj in s) { io.MoveNext(); ir.MoveNext(); if(obj == null) { test(io.Current == null); test(ir.Current == null); } else { test(obj.i == io.Current.i); test(obj.i == ir.Current.i); } } } callback.called(); } public void opSerialSmallCSharpNullI(Ice.AsyncResult result) { try { Serialize.Small o; Serialize.Small r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialSmallCSharp(out o, result); test(o == null); test(r == null); callback.called(); } catch(Ice.OperationNotExistException) { // OK, talking to non-C# server. } } public void opSerialSmallCSharpI(Ice.AsyncResult result) { try { Serialize.Small o; Serialize.Small r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialSmallCSharp(out o, result); test(o.i == 99); test(r.i == 99); callback.called(); } catch(Ice.OperationNotExistException) { // OK, talking to non-C# server. } } public void opSerialLargeCSharpI(Ice.AsyncResult result) { try { Serialize.Large o; Serialize.Large r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialLargeCSharp(out o, result); test(o.d1 == 1.0); test(o.d2 == 2.0); test(o.d3 == 3.0); test(o.d4 == 4.0); test(o.d5 == 5.0); test(o.d6 == 6.0); test(o.d7 == 7.0); test(o.d8 == 8.0); test(o.d9 == 9.0); test(o.d10 == 10.0); test(r.d1 == 1.0); test(r.d2 == 2.0); test(r.d3 == 3.0); test(r.d4 == 4.0); test(r.d5 == 5.0); test(r.d6 == 6.0); test(r.d7 == 7.0); test(r.d8 == 8.0); test(r.d9 == 9.0); test(r.d10 == 10.0); callback.called(); } catch(Ice.OperationNotExistException) { // OK, talking to non-C# server. } } public void opSerialStructCSharpI(Ice.AsyncResult result) { try { Serialize.Struct o; Serialize.Struct r = Test.MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opSerialStructCSharp(out o, result); test(o.o == null); test(o.o2 != null); test(((Serialize.Struct)(o.o2)).o == null); test(((Serialize.Struct)(o.o2)).o2 == o.o2); test(o.s == null); test(o.s2.Equals("Hello")); test(r.o == null); test(r.o2 != null); test(((Serialize.Struct)(r.o2)).o == null); test(((Serialize.Struct)(r.o2)).o2 == r.o2); test(r.s == null); test(r.s2.Equals("Hello")); callback.called(); } catch(Ice.OperationNotExistException) { // OK, talking to non-C# server. } } public virtual void check() { callback.check(); } private CallbackBase callback = new CallbackBase(); } static int _length = 100; internal static void twowaysAMI(Ice.Communicator communicator, Test.MyClassPrx p) { { byte[] i = new byte[_length]; for(int c = 0; c < _length; ++c) { i[c] =(byte)c; } Callback cb = new Callback(); p.begin_opAByteS(i, null, cb.opAByteSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add((byte)c); } Callback cb = new Callback(); p.begin_opLByteS(i, null, cb.opLByteSI, i); cb.check(); } { LinkedList i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast((byte)c); } Callback cb = new Callback(); p.begin_opKByteS(i, null, cb.opKByteSI, i); cb.check(); } { Queue i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue((byte)c); } Callback cb = new Callback(); p.begin_opQByteS(i, null, cb.opQByteSI, i); cb.check(); } { Stack i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push((byte)c); } Callback cb = new Callback(); p.begin_opSByteS(i, null, cb.opSByteSI, i); cb.check(); } { bool[] i = new bool[_length]; for(int c = 0; c < _length; ++c) { i[c] = c % 1 == 1; } Callback cb = new Callback(); p.begin_opABoolS(i, null, cb.opABoolSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add(c % 1 == 1); } Callback cb = new Callback(); p.begin_opLBoolS(i, null, cb.opLBoolSI, i); cb.check(); } { LinkedList i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast(c % 1 == 1); } Callback cb = new Callback(); p.begin_opKBoolS(i, null, cb.opKBoolSI, i); cb.check(); } { Queue i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue(c % 1 == 1); } Callback cb = new Callback(); p.begin_opQBoolS(i, null, cb.opQBoolSI, i); cb.check(); } { Stack i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push(c % 1 == 1); } Callback cb = new Callback(); p.begin_opSBoolS(i, null, cb.opSBoolSI, i); cb.check(); } { short[] i = new short[_length]; for(int c = 0; c < _length; ++c) { i[c] =(short)c; } Callback cb = new Callback(); p.begin_opAShortS(i, null, cb.opAShortSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add((short)c); } Callback cb = new Callback(); p.begin_opLShortS(i, null, cb.opLShortSI, i); cb.check(); } { LinkedList i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast((short)c); } Callback cb = new Callback(); p.begin_opKShortS(i, null, cb.opKShortSI, i); cb.check(); } { Queue i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue((short)c); } Callback cb = new Callback(); p.begin_opQShortS(i, null, cb.opQShortSI, i); cb.check(); } { Stack i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push((short)c); } Callback cb = new Callback(); p.begin_opSShortS(i, null, cb.opSShortSI, i); cb.check(); } { int[] i = new int[_length]; for(int c = 0; c < _length; ++c) { i[c] =(int)c; } Callback cb = new Callback(); p.begin_opAIntS(i, null, cb.opAIntSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add((int)c); } Callback cb = new Callback(); p.begin_opLIntS(i, null, cb.opLIntSI, i); cb.check(); } { LinkedList i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast((int)c); } Callback cb = new Callback(); p.begin_opKIntS(i, null, cb.opKIntSI, i); cb.check(); } { Queue i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue((int)c); } Callback cb = new Callback(); p.begin_opQIntS(i, null, cb.opQIntSI, i); cb.check(); } { Stack i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push((int)c); } Callback cb = new Callback(); p.begin_opSIntS(i, null, cb.opSIntSI, i); cb.check(); } { long[] i = new long[_length]; for(int c = 0; c < _length; ++c) { i[c] =(long)c; } Callback cb = new Callback(); p.begin_opALongS(i, null, cb.opALongSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add((long)c); } Callback cb = new Callback(); p.begin_opLLongS(i, null, cb.opLLongSI, i); cb.check(); } { LinkedList i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast((long)c); } Callback cb = new Callback(); p.begin_opKLongS(i, null, cb.opKLongSI, i); cb.check(); } { Queue i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue((long)c); } Callback cb = new Callback(); p.begin_opQLongS(i, null, cb.opQLongSI, i); cb.check(); } { Stack i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push((long)c); } Callback cb = new Callback(); p.begin_opSLongS(i, null, cb.opSLongSI, i); cb.check(); } { float[] i = new float[_length]; for(int c = 0; c < _length; ++c) { i[c] =(float)c; } Callback cb = new Callback(); p.begin_opAFloatS(i, null, cb.opAFloatSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add((float)c); } Callback cb = new Callback(); p.begin_opLFloatS(i, null, cb.opLFloatSI, i); cb.check(); } { LinkedList i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast((float)c); } Callback cb = new Callback(); p.begin_opKFloatS(i, null, cb.opKFloatSI, i); cb.check(); } { Queue i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue((float)c); } Callback cb = new Callback(); p.begin_opQFloatS(i, null, cb.opQFloatSI, i); cb.check(); } { Stack i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push((float)c); } Callback cb = new Callback(); p.begin_opSFloatS(i, null, cb.opSFloatSI, i); cb.check(); } { double[] i = new double[_length]; for(int c = 0; c < _length; ++c) { i[c] =(double)c; } Callback cb = new Callback(); p.begin_opADoubleS(i, null, cb.opADoubleSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add((double)c); } Callback cb = new Callback(); p.begin_opLDoubleS(i, null, cb.opLDoubleSI, i); cb.check(); } { LinkedList i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast((double)c); } Callback cb = new Callback(); p.begin_opKDoubleS(i, null, cb.opKDoubleSI, i); cb.check(); } { Queue i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue((double)c); } Callback cb = new Callback(); p.begin_opQDoubleS(i, null, cb.opQDoubleSI, i); cb.check(); } { Stack i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push((double)c); } Callback cb = new Callback(); p.begin_opSDoubleS(i, null, cb.opSDoubleSI, i); cb.check(); } { string[] i = new string[_length]; for(int c = 0; c < _length; ++c) { i[c] = c.ToString(); } Callback cb = new Callback(); p.begin_opAStringS(i, null, cb.opAStringSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add(c.ToString()); } Callback cb = new Callback(); p.begin_opLStringS(i, null, cb.opLStringSI, i); cb.check(); } { LinkedList i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast(c.ToString()); } Callback cb = new Callback(); p.begin_opKStringS(i, null, cb.opKStringSI, i); cb.check(); } { Queue i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue(c.ToString()); } Callback cb = new Callback(); p.begin_opQStringS(i, null, cb.opQStringSI, i); cb.check(); } { Stack i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push(c.ToString()); } Callback cb = new Callback(); p.begin_opSStringS(i, null, cb.opSStringSI, i); cb.check(); } { Ice.Value[] i = new Ice.Value[_length]; for(int c = 0; c < _length; ++c) { i[c] = new Test.CV(c); } Callback cb = new Callback(); p.begin_opAObjectS(i, null, cb.opAObjectSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add(new Test.CV(c)); } Callback cb = new Callback(); p.begin_opLObjectS(i, null, cb.opLObjectSI, i); cb.check(); } { Ice.ObjectPrx[] i = new Ice.ObjectPrx[_length]; for(int c = 0; c < _length; ++c) { i[c] = communicator.stringToProxy(c.ToString()); } Callback cb = new Callback(); p.begin_opAObjectPrxS(i, null, cb.opAObjectPrxSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add(communicator.stringToProxy(c.ToString())); } Callback cb = new Callback(); p.begin_opLObjectPrxS(i, null, cb.opLObjectPrxSI, i); cb.check(); } { LinkedList i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast(communicator.stringToProxy(c.ToString())); } Callback cb = new Callback(); p.begin_opKObjectPrxS(i, null, cb.opKObjectPrxSI, i); cb.check(); } { Queue i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue(communicator.stringToProxy(c.ToString())); } Callback cb = new Callback(); p.begin_opQObjectPrxS(i, null, cb.opQObjectPrxSI, i); cb.check(); } { Stack i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push(communicator.stringToProxy(c.ToString())); } Callback cb = new Callback(); p.begin_opSObjectPrxS(i, null, cb.opSObjectPrxSI, i); cb.check(); } { var i = new Test.S[_length]; for(int c = 0; c < _length; ++c) { i[c].i = c; } Callback cb = new Callback(); p.begin_opAStructS(i, null, cb.opAStructSI, i); cb.check(); } { var i = new List(); for(int c = 0; c < _length; ++c) { i.Add(new Test.S(c)); } Callback cb = new Callback(); p.begin_opLStructS(i, null, cb.opLStructSI, i); cb.check(); } { var i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast(new Test.S(c)); } Callback cb = new Callback(); p.begin_opKStructS(i, null, cb.opKStructSI, i); cb.check(); } { var i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue(new Test.S(c)); } Callback cb = new Callback(); p.begin_opQStructS(i, null, cb.opQStructSI, i); cb.check(); } { var i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push(new Test.S(c)); } Callback cb = new Callback(); p.begin_opSStructS(i, null, cb.opSStructSI, i); cb.check(); } { var i = new Test.CV[_length]; for(int c = 0; c < _length; ++c) { i[c] = new Test.CV(c); } Callback cb = new Callback(); p.begin_opACVS(i, null, cb.opACVSI, i); cb.check(); } { var i = new List(); for(int c = 0; c < _length; ++c) { i.Add(new Test.CV(c)); } Callback cb = new Callback(); p.begin_opLCVS(i, null, cb.opLCVSI, i); cb.check(); } { Test.IPrx[] i = new Test.IPrx[_length]; for(int c = 0; c < _length; ++c) { i[c] = Test.IPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())); } Callback cb = new Callback(); p.begin_opAIPrxS(i, null, cb.opIPrxSI, i); cb.check(); } { List i = new List(); for(int c = 0; c < _length; ++c) { i.Add(Test.IPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString()))); } Callback cb = new Callback(); p.begin_opLIPrxS(i, null, cb.opLIPrxSI, i); cb.check(); } { LinkedList i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast(Test.IPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString()))); } Callback cb = new Callback(); p.begin_opKIPrxS(i, null, cb.opKIPrxSI, i); cb.check(); } { Queue i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue(Test.IPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString()))); } Callback cb = new Callback(); p.begin_opQIPrxS(i, null, cb.opQIPrxSI, i); cb.check(); } { Stack i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push(Test.IPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString()))); } Callback cb = new Callback(); p.begin_opSIPrxS(i, null, cb.opSIPrxSI, i); cb.check(); } { var i = new Test.CR[_length]; for(int c = 0; c < _length; ++c) { i[c] = new Test.CR(new Test.CV(c)); } Callback cb = new Callback(); p.begin_opACRS(i, null, cb.opACRSI, i); cb.check(); } { var i = new List(); for(int c = 0; c < _length; ++c) { i.Add(new Test.CR(new Test.CV(c))); } Callback cb = new Callback(); p.begin_opLCRS(i, null, cb.opLCRSI, i); cb.check(); } { var i = new Test.En[_length]; for(int c = 0; c < _length; ++c) { i[c] =(Test.En)(c % 3); } Callback cb = new Callback(); p.begin_opAEnS(i, null, cb.opAEnSI, i); cb.check(); } { var i = new List(); for(int c = 0; c < _length; ++c) { i.Add((Test.En)(c % 3)); } Callback cb = new Callback(); p.begin_opLEnS(i, null, cb.opLEnSI, i); cb.check(); } { var i = new LinkedList(); for(int c = 0; c < _length; ++c) { i.AddLast((Test.En)(c % 3)); } Callback cb = new Callback(); p.begin_opKEnS(i, null, cb.opKEnSI, i); cb.check(); } { var i = new Queue(); for(int c = 0; c < _length; ++c) { i.Enqueue((Test.En)(c % 3)); } Callback cb = new Callback(); p.begin_opQEnS(i, null, cb.opQEnSI, i); cb.check(); } { var i = new Stack(); for(int c = 0; c < _length; ++c) { i.Push((Test.En)(c % 3)); } Callback cb = new Callback(); p.begin_opSEnS(i, null, cb.opSEnSI, i); cb.check(); } { Custom i = new Custom(); for(int c = 0; c < _length; ++c) { i.Add(c); } Callback cb = new Callback(); p.begin_opCustomIntS(i, null, cb.opCustomIntSI, i); cb.check(); } { var i = new Custom(); for(int c = 0; c < _length; ++c) { i.Add(new Test.CV(c)); } Callback cb = new Callback(); p.begin_opCustomCVS(i, null, cb.opCustomCVSI, i); cb.check(); } { Custom> i = new Custom>(); for(int c = 0; c < _length; ++c) { Custom inner = new Custom(); for(int j = 0; j < c; ++j) { inner.Add(j); } i.Add(inner); } Callback cb = new Callback(); p.begin_opCustomIntSS(i, null, cb.opCustomIntSSI, i); cb.check(); } { var i = new Custom>(); for(int c = 0; c < _length; ++c) { var inner = new Custom(); for(int j = 0; j < c; ++j) { inner.Add(new Test.CV(j)); } i.Add(inner); } Callback cb = new Callback(); p.begin_opCustomCVSS(i, null, cb.opCustomCVSSI, i); cb.check(); } { Serialize.Small i = null; Callback cb = new Callback(); p.begin_opSerialSmallCSharp(i, null, cb.opSerialSmallCSharpNullI, i); cb.check(); } { Serialize.Small i = new Serialize.Small(); i.i = 99; Callback cb = new Callback(); p.begin_opSerialSmallCSharp(i, null, cb.opSerialSmallCSharpI, i); cb.check(); } { 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; Callback cb = new Callback(); p.begin_opSerialLargeCSharp(i, null, cb.opSerialLargeCSharpI, i); cb.check(); } { Serialize.Struct i = new Serialize.Struct(); i.o = null; i.o2 = i; i.s = null; i.s2 = "Hello"; Callback cb = new Callback(); p.begin_opSerialStructCSharp(i, null, cb.opSerialStructCSharpI, i); cb.check(); } } } } }