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