Ejemplo n.º 1
0
        /// <summary>
        /// 从服务器端加载所有接口定义信息
        /// </summary>
        public static void LoadInterfaceConfig()
        {
            List <ServiceInfo> subsystemInfos = CommunicateProxy.GetRemoteInterfaceCatalog();

            foreach (ServiceInfo subsystemInfo in subsystemInfos)
            {
                if (subsystemInfo != null && subsystemInfo.Type != null)
                {
                    subsystems.Add(subsystemInfo.Type, subsystemInfo);
                    foreach (RemoteMethodInfo rmInfo in subsystemInfo.RemoteMethods)
                    {
                        if (rmInfo != null && rmInfo.MethodInfo != null)
                        {
                            services.Add(rmInfo.MethodInfo, rmInfo);
                        }
                    }
                }
            }
        }