示例#1
0
 public void contextAction(string action, Murmur.User usr, int session, int channelid, _System.Collections.Generic.Dictionary<string, string> context__)
 {
     IceInternal.Outgoing og__ = handler__.getOutgoing("contextAction", Ice.OperationMode.Idempotent, context__);
     try
     {
         try
         {
             IceInternal.BasicStream os__ = og__.ostr();
             os__.writeString(action);
             if(usr == null)
             {
                 Murmur.User tmp__ = new Murmur.User();
                 tmp__.write__(os__);
             }
             else
             {
                 usr.write__(os__);
             }
             os__.writeInt(session);
             os__.writeInt(channelid);
         }
         catch(Ice.LocalException ex__)
         {
             og__.abort(ex__);
         }
         bool ok__ = og__.invoke();
         if(!og__.istr().isEmpty())
         {
             try
             {
                 if(!ok__)
                 {
                     try
                     {
                         og__.throwUserException();
                     }
                     catch(Ice.UserException ex__)
                     {
                         throw new Ice.UnknownUserException(ex__.ice_name(), ex__);
                     }
                 }
                 og__.istr().skipEmptyEncaps();
             }
             catch(Ice.LocalException ex__)
             {
                 throw new IceInternal.LocalExceptionWrapper(ex__, false);
             }
         }
     }
     finally
     {
         handler__.reclaimOutgoing(og__);
     }
 }
示例#2
0
 public void userStateChanged(Murmur.User state, _System.Collections.Generic.Dictionary<string, string> context__)
 {
     IceInternal.Outgoing og__ = handler__.getOutgoing("userStateChanged", Ice.OperationMode.Idempotent, context__);
     try
     {
         try
         {
             IceInternal.BasicStream os__ = og__.ostr();
             if(state == null)
             {
                 Murmur.User tmp__ = new Murmur.User();
                 tmp__.write__(os__);
             }
             else
             {
                 state.write__(os__);
             }
         }
         catch(Ice.LocalException ex__)
         {
             og__.abort(ex__);
         }
         bool ok__ = og__.invoke();
         if(!og__.istr().isEmpty())
         {
             try
             {
                 if(!ok__)
                 {
                     try
                     {
                         og__.throwUserException();
                     }
                     catch(Ice.UserException ex__)
                     {
                         throw new Ice.UnknownUserException(ex__.ice_name(), ex__);
                     }
                 }
                 og__.istr().skipEmptyEncaps();
             }
             catch(Ice.LocalException ex__)
             {
                 throw new IceInternal.LocalExceptionWrapper(ex__, false);
             }
         }
     }
     finally
     {
         handler__.reclaimOutgoing(og__);
     }
 }
示例#3
0
 public static void write(IceInternal.BasicStream os__,
     _System.Collections.Generic.Dictionary<int, Murmur.User> v__)
 {
     if(v__ == null)
     {
         os__.writeSize(0);
     }
     else
     {
         os__.writeSize(v__.Count);
         foreach(_System.Collections.Generic.KeyValuePair<int, Murmur.User> e__ in v__)
         {
             os__.writeInt(e__.Key);
             if(e__.Value == null)
             {
                 Murmur.User tmp__ = new Murmur.User();
                 tmp__.write__(os__);
             }
             else
             {
                 e__.Value.write__(os__);
             }
         }
     }
 }
示例#4
0
 public void ice_response(Murmur.User ret__)
 {
     if(validateResponse__(true))
     {
         try
         {
             IceInternal.BasicStream os__ = this.os__();
             if(ret__ == null)
             {
                 Murmur.User tmp__ = new Murmur.User();
                 tmp__.write__(os__);
             }
             else
             {
                 ret__.write__(os__);
             }
         }
         catch(Ice.LocalException ex__)
         {
             ice_exception(ex__);
         }
         response__(true);
     }
 }
示例#5
0
文件: Murmur.cs 项目: Vinhold/halcyon
 private Ice.AsyncResult<Murmur.Callback_ServerContextCallback_contextAction> begin_contextAction(string action, Murmur.User usr, int session, int channelid, _System.Collections.Generic.Dictionary<string, string> ctx__, bool explicitContext__, Ice.AsyncCallback cb__, object cookie__)
 {
     IceInternal.OnewayOutgoingAsync<Murmur.Callback_ServerContextCallback_contextAction> result__ = new IceInternal.OnewayOutgoingAsync<Murmur.Callback_ServerContextCallback_contextAction>(this, __contextAction_name, contextAction_completed__, cookie__);
     if(cb__ != null)
     {
         result__.whenCompletedWithAsyncCallback(cb__);
     }
     try
     {
         result__.prepare__(__contextAction_name, Ice.OperationMode.Idempotent, ctx__, explicitContext__);
         IceInternal.BasicStream os__ = result__.ostr__;
         os__.writeString(action);
         if(usr == null)
         {
             Murmur.User tmp__ = new Murmur.User();
             tmp__.write__(os__);
         }
         else
         {
             usr.write__(os__);
         }
         os__.writeInt(session);
         os__.writeInt(channelid);
         os__.endWriteEncaps();
         result__.send__(true);
     }
     catch(Ice.LocalException ex__)
     {
         result__.exceptionAsync__(ex__);
     }
     return result__;
 }
示例#6
0
文件: Murmur.cs 项目: Vinhold/halcyon
 private Ice.AsyncResult<Murmur.Callback_ServerCallback_userStateChanged> begin_userStateChanged(Murmur.User state, _System.Collections.Generic.Dictionary<string, string> ctx__, bool explicitContext__, Ice.AsyncCallback cb__, object cookie__)
 {
     IceInternal.OnewayOutgoingAsync<Murmur.Callback_ServerCallback_userStateChanged> result__ = new IceInternal.OnewayOutgoingAsync<Murmur.Callback_ServerCallback_userStateChanged>(this, __userStateChanged_name, userStateChanged_completed__, cookie__);
     if(cb__ != null)
     {
         result__.whenCompletedWithAsyncCallback(cb__);
     }
     try
     {
         result__.prepare__(__userStateChanged_name, Ice.OperationMode.Idempotent, ctx__, explicitContext__);
         IceInternal.BasicStream os__ = result__.ostr__;
         if(state == null)
         {
             Murmur.User tmp__ = new Murmur.User();
             tmp__.write__(os__);
         }
         else
         {
             state.write__(os__);
         }
         os__.endWriteEncaps();
         result__.send__(true);
     }
     catch(Ice.LocalException ex__)
     {
         result__.exceptionAsync__(ex__);
     }
     return result__;
 }