Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
        public static void ClearList(Object obj)
        {
            MemberCallDelegate clearMethod = TypeUtility.GetMemberCallDelegate(obj.GetType(), "Clear");

            clearMethod(obj);
        }