示例#1
0
        /// <summary>
        /// 注册Proxy
        /// </summary>
        /// <param name="classType">节点类</param>
        /// <param name="nodeType">节点类型</param>
        /// <param name="type">逻辑对应的Type</param>
        public void Register(string classType, NodeType nodeType, Type type)
        {
            if (string.IsNullOrEmpty(classType))
            {
                throw new Exception("CSharpProxyManager.Register() \n classType is null.");
            }

            if (proxies.ContainsKey(classType))
            {
                throw new Exception($"CSharpProxyManager.Register() \n m_ProxyDic already Contain key {classType}.");
            }

            var proxyData = new ProxyData
            {
                Name       = classType,
                NodeType   = nodeType,
                Type       = type,
                NeedUpdate = false
            };

            proxies.Add(classType, proxyData);
        }
示例#2
0
 internal void SetProxyData(ProxyData proxyData)
 {
     ProxyData = proxyData;
 }