Esempio n. 1
0
 public static void Register(TaskRequest taskRequest, string serverCode)
 {
     lock (m_taskRequestObj)
     {
         if (!m_taskRequestDic.ContainsKey(serverCode))
         {
             m_taskRequestDic.Add(serverCode, serviceName);
             RemotingServices.Marshal(taskRequest, serverCode + "." + serviceName);
         }
     }
 }
Esempio n. 2
0
 public static void Unregister(string serverCode)
 {
     lock (m_taskRequestObj)
     {
         if (m_taskRequestDic.ContainsKey(serverCode))
         {
             TaskRequest handle = GetService(serverCode) as TaskRequest;
             if (handle != null)
             {
                 RemotingServices.Unmarshal(handle.CreateObjRef(handle.GetType()));
             }
             m_taskRequestDic.Remove(serverCode);
         }
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 注册通道的服务
        /// </summary>
        /// <param name="server"></param>
        public static void RegisterService(IServerInfo server)
        {
            TaskRequest request = new TaskRequest();

            JinRi.Notify.Frame.RegisterService.TaskRequestService.Register(request, server.ServerCode);
        }