Exemplo n.º 1
0
        private ServiceImplementStub(IDataReceiver dataReceiver, Type serviceType, IRpcImplInstnce rpcImpl)
        {
            rpcImplInstance = rpcImpl;

            routingRule             = MetaData.GetServiceRoutingRule(serviceType);
            serviceMethodDispatcher = MetaData.GetServiceMethodDispatcher(serviceType);
            methodSerializer        = MetaData.GetMethodSerializer(serviceType);
            dataReceiver.RegisterImpl(this, MetaData.GetServiceId(serviceType));
        }
Exemplo n.º 2
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((IScene2CliImpl)impl).SyncPosition((Int32)(method.Args[0]), (Int32)(method.Args[1]));
         break;
     }
 }
Exemplo n.º 3
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((ILogic2CliImpl)impl).ServerMessageOk();
         break;
     }
 }
Exemplo n.º 4
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((ICli2LogicImpl)impl).AskChangeName((UInt64)(method.Args[0]), (String)(method.Args[1])).ContinueWith(t => DoContinue(t, cont));
         break;
     case 2:
         ((ICli2LogicImpl)impl).AskAddMoney((UInt64)(method.Args[0]), (UInt32)(method.Args[1])).ContinueWith(t => DoContinue(t, cont));
         break;
     case 3:
         ((ICli2LogicImpl)impl).AskLearnSkill((UInt64)(method.Args[0]), (UInt32)(method.Args[1])).ContinueWith(t => DoContinue(t, cont));
         break;
     case 4:
         ((ICli2LogicImpl)impl).TestEnum((UInt64)(method.Args[0]), (TowerState)(method.Args[1])).ContinueWith(t => DoContinue(t, cont));
         break;
     case 5:
         ((ICli2LogicImpl)impl).TestArray((UInt64[])(method.Args[0]), (TowerState)(method.Args[1])).ContinueWith(t => DoContinue(t, cont));
         break;
     case 6:
         ((ICli2LogicImpl)impl).TestList((List<Boolean>)(method.Args[0]), (TowerState)(method.Args[1])).ContinueWith(t => DoContinue(t, cont));
         break;
     case 7:
         ((ICli2LogicImpl)impl).TestDict((Dictionary<Boolean, PlayerInfo>)(method.Args[0]), (TowerState)(method.Args[1])).ContinueWith(t => DoContinue(t, cont));
         break;
     case 8:
         ((ICli2LogicImpl)impl).RequestPlayerInfo((UInt64)(method.Args[0])).ContinueWith(t => DoContinue(t, cont));
         break;
     case 9:
         ((ICli2LogicImpl)impl).TestHierarchy((TestBaseClass)(method.Args[0]), (TestDerived1Class)(method.Args[1]), (TestDerived11Class)(method.Args[2])).ContinueWith(t => DoContinue(t, cont));
         break;
     case 10:
         ((ICli2LogicImpl)impl).TestHierarch2y((TestBaseClass)(method.Args[0]), (TestDerived1Class)(method.Args[1]), (TestDerived11Class)(method.Args[2])).ContinueWith(t => DoContinue(t, cont));
         break;
     }
 }
Exemplo n.º 5
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((IWatcherServiceNotifyImpl)impl).NotifyWatchingMaster((Byte[])(method.Args[0]), (String)(method.Args[1]));
         break;
     case 2:
         ((IWatcherServiceNotifyImpl)impl).NotifyInstanceSubjectiveDown((Byte[])(method.Args[0]), (String)(method.Args[1]));
         break;
     }
 }
Exemplo n.º 6
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((IDbClientNotifyImpl)impl).NotifyConnectionInfo((String)(method.Args[0]), (Int32)(method.Args[1]));
         break;
     }
 }
Exemplo n.º 7
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((ILoginNotifyImpl)impl).NotifyLogicServerWorking((String)(method.Args[0]));
         break;
     }
 }
Exemplo n.º 8
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((ILogic2SchedulerImpl)impl).RequestScheduleJob((Int32)(method.Args[0])).ContinueWith(t => DoContinue(t, cont));
         break;
     }
 }
Exemplo n.º 9
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((ICli2LoginImpl)impl).AskLogin((String)(method.Args[0]), (String)(method.Args[1]), (Byte[])(method.Args[2])).ContinueWith(t => DoContinue(t, cont));
         break;
     }
 }
Exemplo n.º 10
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((ICli2SceneImpl)impl).AskMoveTo((Int32)(method.Args[0]), (Int32)(method.Args[1])).ContinueWith(t => DoContinue(t, cont));
         break;
     }
 }
Exemplo n.º 11
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((ILogic2CliImpl)impl).ServerMessageOk();
         break;
     }
 }
Exemplo n.º 12
0
 public void Dispatch(IRpcImplInstnce impl, RpcMethod method, ServiceImplementStub.SendResult cont)
 {
     switch (method.MethodId)
     {
     case 1:
         ((IScene2CliImpl)impl).SyncPosition((Int32)(method.Args[0]), (Int32)(method.Args[1]));
         break;
     }
 }