예제 #1
0
 public void createAccount(Bank.PersonalData data, Bank.accountType type, out string accountID, _System.Collections.Generic.Dictionary<string, string> context__, Ice.Instrumentation.InvocationObserver observer__)
 {
     IceInternal.Outgoing og__ = handler__.getOutgoing("createAccount", Ice.OperationMode.Normal, context__, observer__);
     try
     {
         try
         {
             IceInternal.BasicStream os__ = og__.startWriteParams(Ice.FormatType.DefaultFormat);
             if(data == null)
             {
                 Bank.PersonalData tmp__ = new Bank.PersonalData();
                 tmp__.write__(os__);
             }
             else
             {
                 data.write__(os__);
             }
             os__.writeEnum((int)type, 1);
             og__.endWriteParams();
         }
         catch(Ice.LocalException ex__)
         {
             og__.abort(ex__);
         }
         bool ok__ = og__.invoke();
         try
         {
             if(!ok__)
             {
                 try
                 {
                     og__.throwUserException();
                 }
                 catch(Bank.IncorrectData)
                 {
                     throw;
                 }
                 catch(Bank.RequestRejected)
                 {
                     throw;
                 }
                 catch(Ice.UserException ex__)
                 {
                     throw new Ice.UnknownUserException(ex__.ice_name(), ex__);
                 }
             }
             IceInternal.BasicStream is__ = og__.startReadParams();
             accountID = is__.readString();
             og__.endReadParams();
         }
         catch(Ice.LocalException ex__)
         {
             throw new IceInternal.LocalExceptionWrapper(ex__, false);
         }
     }
     finally
     {
         handler__.reclaimOutgoing(og__);
     }
 }
예제 #2
0
 public static Ice.DispatchStatus createAccount___(BankManager obj__, IceInternal.Incoming inS__, Ice.Current current__)
 {
     checkMode__(Ice.OperationMode.Normal, current__.mode);
     IceInternal.BasicStream is__ = inS__.startReadParams();
     Bank.PersonalData data;
     data = null;
     Bank.accountType type;
     if(data == null)
     {
         data = new Bank.PersonalData();
     }
     data.read__(is__);
     type = (Bank.accountType)is__.readEnum(1);
     inS__.endReadParams();
     string accountID;
     try
     {
         obj__.createAccount(data, type, out accountID, current__);
         IceInternal.BasicStream os__ = inS__.startWriteParams__(Ice.FormatType.DefaultFormat);
         os__.writeString(accountID);
         inS__.endWriteParams__(true);
         return Ice.DispatchStatus.DispatchOK;
     }
     catch(Bank.IncorrectData ex__)
     {
         inS__.writeUserException__(ex__, Ice.FormatType.DefaultFormat);
         return Ice.DispatchStatus.DispatchUserException;
     }
     catch(Bank.RequestRejected ex__)
     {
         inS__.writeUserException__(ex__, Ice.FormatType.DefaultFormat);
         return Ice.DispatchStatus.DispatchUserException;
     }
 }
예제 #3
0
 private Ice.AsyncResult<Bank.Callback_BankManager_createAccount> begin_createAccount(Bank.PersonalData data, Bank.accountType type, _System.Collections.Generic.Dictionary<string, string> ctx__, bool explicitContext__, Ice.AsyncCallback cb__, object cookie__)
 {
     checkAsyncTwowayOnly__(__createAccount_name);
     IceInternal.TwowayOutgoingAsync<Bank.Callback_BankManager_createAccount> result__ =  new IceInternal.TwowayOutgoingAsync<Bank.Callback_BankManager_createAccount>(this, __createAccount_name, createAccount_completed__, cookie__);
     if(cb__ != null)
     {
         result__.whenCompletedWithAsyncCallback(cb__);
     }
     try
     {
         result__.prepare__(__createAccount_name, Ice.OperationMode.Normal, ctx__, explicitContext__);
         IceInternal.BasicStream os__ = result__.startWriteParams__(Ice.FormatType.DefaultFormat);
         if(data == null)
         {
             Bank.PersonalData tmp__ = new Bank.PersonalData();
             tmp__.write__(os__);
         }
         else
         {
             data.write__(os__);
         }
         os__.writeEnum((int)type, 1);
         result__.endWriteParams__();
         result__.send__(true);
     }
     catch(Ice.LocalException ex__)
     {
         result__.exceptionAsync__(ex__);
     }
     return result__;
 }