// // Copyright (c) ZeroC, Inc. All rights reserved. // using System.Collections.Generic; using System.Threading.Tasks; namespace Ice { namespace optional { namespace AMD { public class InitialI : Test.InitialDisp_ { public override Task shutdownAsync(Ice.Current current) { current.adapter.getCommunicator().shutdown(); return null; } public override Task pingPongAsync(Ice.Value obj, Ice.Current current) { return Task.FromResult(obj); } public override Task opOptionalExceptionAsync(Ice.Optional a, Ice.Optional b, Ice.Optional o, Ice.Current c) { throw new Test.OptionalException(false, a, b, o); } public override Task opDerivedExceptionAsync(Ice.Optional a, Ice.Optional b, Ice.Optional o, Ice.Current c) { throw new Test.DerivedException(false, a, b, o, "d1", b, o, "d2"); } public override Task opRequiredExceptionAsync(Ice.Optional a, Ice.Optional b, Ice.Optional o, Ice.Current c) { var e = new Test.RequiredException(); e.a = a; e.b = b; e.o = o; if(b.HasValue) { e.ss = b.Value; } if(o.HasValue) { e.o2 = o.Value; } throw e; } public override Task opByteAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpByteResult(p1, p1)); } public override Task opBoolAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpBoolResult(p1, p1)); } public override Task opShortAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpShortResult(p1, p1)); } public override Task opIntAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpIntResult(p1, p1)); } public override Task opLongAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpLongResult(p1, p1)); } public override Task opFloatAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpFloatResult(p1, p1)); } public override Task opDoubleAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpDoubleResult(p1, p1)); } public override Task opStringAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpStringResult(p1, p1)); } public override Task opMyEnumAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpMyEnumResult(p1, p1)); } public override Task opSmallStructAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpSmallStructResult(p1, p1)); } public override Task opFixedStructAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpFixedStructResult(p1, p1)); } public override Task opVarStructAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpVarStructResult(p1, p1)); } public override Task opOneOptionalAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpOneOptionalResult(p1, p1)); } public override Task opOneOptionalProxyAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpOneOptionalProxyResult(p1, p1)); } public override Task opByteSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpByteSeqResult(p1, p1)); } public override Task opBoolSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpBoolSeqResult(p1, p1)); } public override Task opShortSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpShortSeqResult(p1, p1)); } public override Task opIntSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpIntSeqResult(p1, p1)); } public override Task opLongSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpLongSeqResult(p1, p1)); } public override Task opFloatSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpFloatSeqResult(p1, p1)); } public override Task opDoubleSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpDoubleSeqResult(p1, p1)); } public override Task opStringSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpStringSeqResult(p1, p1)); } public override Task opSmallStructSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpSmallStructSeqResult(p1, p1)); } public override Task opSmallStructListAsync(Ice.Optional> p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpSmallStructListResult(p1, p1)); } public override Task opFixedStructSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpFixedStructSeqResult(p1, p1)); } public override Task opFixedStructListAsync(Ice.Optional> p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpFixedStructListResult(p1, p1)); } public override Task opVarStructSeqAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpVarStructSeqResult(p1, p1)); } public override Task opSerializableAsync(Ice.Optional p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpSerializableResult(p1, p1)); } public override Task opIntIntDictAsync(Ice.Optional> p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpIntIntDictResult(p1, p1)); } public override Task opStringIntDictAsync(Ice.Optional> p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpStringIntDictResult(p1, p1)); } public override Task opIntOneOptionalDictAsync(Ice.Optional> p1, Ice.Current current) { return Task.FromResult(new Test.Initial_OpIntOneOptionalDictResult(p1, p1)); } public override Task opClassAndUnknownOptionalAsync(Test.A p, Ice.Current current) { return null; } public override Task sendOptionalClassAsync(bool req, Ice.Optional o, Ice.Current current) { return null; } public override Task> returnOptionalClassAsync(bool req, Ice.Current current) { return Task.FromResult(new Ice.Optional(new Test.OneOptional(53))); } public override Task opGAsync(Test.G g, Ice.Current current) { return Task.FromResult(g); } public override Task opVoidAsync(Ice.Current current) { return null; } public async override Task opMStruct1Async(Ice.Current current) { await Task.Delay(0); return new Test.Initial_OpMStruct1MarshaledResult(new Test.SmallStruct(), current); } public async override Task opMStruct2Async(Ice.Optional p1, Ice.Current current) { await Task.Delay(0); return new Test.Initial_OpMStruct2MarshaledResult(p1, p1, current); } public async override Task opMSeq1Async(Ice.Current current) { await Task.Delay(0); return new Test.Initial_OpMSeq1MarshaledResult(new string[0], current); } public async override Task opMSeq2Async(Ice.Optional p1, Ice.Current current) { await Task.Delay(0); return new Test.Initial_OpMSeq2MarshaledResult(p1, p1, current); } public async override Task opMDict1Async(Ice.Current current) { await Task.Delay(0); return new Test.Initial_OpMDict1MarshaledResult(new Dictionary(), current); } public async override Task opMDict2Async(Ice.Optional> p1, Ice.Current current) { await Task.Delay(0); return new Test.Initial_OpMDict2MarshaledResult(p1, p1, current); } public async override Task opMG1Async(Ice.Current current) { await Task.Delay(0); return new Test.Initial_OpMG1MarshaledResult(new Test.G(), current); } public async override Task opMG2Async(Ice.Optional p1, Ice.Current current) { await Task.Delay(0); return new Test.Initial_OpMG2MarshaledResult(p1, p1, current); } public override Task supportsRequiredParamsAsync(Ice.Current current) { return Task.FromResult(false); } public override Task supportsJavaSerializableAsync(Ice.Current current) { return Task.FromResult(false); } public override Task supportsCsharpSerializableAsync(Ice.Current current) { return Task.FromResult(true); } public override Task supportsCppStringViewAsync(Ice.Current current) { return Task.FromResult(false); } public override Task supportsNullOptionalAsync(Ice.Current current) { return Task.FromResult(true); } } } } }