示例#1
0
            public override bool Equals(Object obj)
            {
                if (Object.ReferenceEquals(this, obj))
                {
                    return(true);
                }
                if (!(obj is GetDelegateKey))
                {
                    return(false);
                }
                GetDelegateKey other = (GetDelegateKey)obj;

                return(Object.Equals(type, other.type) && Object.Equals(memberName, other.memberName));
            }
示例#2
0
        public static MemberCallDelegate GetMemberCallDelegate(Type type, String memberName, bool tryOnly = false)
        {
            GetDelegateKey     key   = new GetDelegateKey(type, memberName);
            MemberCallDelegate value = _memberCallDelegates.Get(key);

            if (value != null)
            {
                return(value);
            }
            MemberCallDelegate delegates = GetMemberCallDelegateIntern(type, memberName, tryOnly);

            if (delegates == null)
            {
                return(null);
            }
            _memberCallDelegates.Put(key, delegates);
            return(delegates);
        }