コード例 #1
0
 protected ProxyType Create(Type type)
 {
     lock (_lock)
     {
         ProxyType proxyType = new ProxyType(type, this);
         this.types.Add(type, proxyType);
         return(proxyType);
     }
 }
コード例 #2
0
        public void Register(IProxyMethodInfo info)
        {
            if (info == null)
            {
                return;
            }

            ProxyType proxyType = GetProxyType(info.DeclaringType);

            proxyType.Add(info);
        }
コード例 #3
0
        public void Unregister(IProxyMemberInfo proxyMemberInfo)
        {
            if (proxyMemberInfo == null)
            {
                return;
            }

            ProxyType proxyType = this.GetType(proxyMemberInfo.DeclaringType);

            proxyType.Unregister(proxyMemberInfo);
        }
コード例 #4
0
        internal ProxyType GetProxyType(Type type)
        {
            ProxyType proxyType;

            if (types.TryGetValue(type, out proxyType))
            {
                return(proxyType);
            }

            proxyType   = new ProxyType(type, this);
            types[type] = proxyType;
            return(proxyType);
        }