public Delegate GetDelegate(MethodInfo info, Type instanceType, Type delegateType, bool useTuple)
        {
            Delegate result;
            var      key = new LocalDelegateCacheKey(info, instanceType, delegateType, useTuple);

            if (!GetCachedDelegate(key, globalDelegateCache, localDelegateCache, out result))
            {
                result = CreateDelegate(info, instanceType, delegateType, useTuple);
                SetCachedDelegate(key, result, globalDelegateCache, localDelegateCache);
            }
            return(result);
        }
 bool Equals(LocalDelegateCacheKey other)
 {
     return(delegateType == other.delegateType && Equals(info, other.info) && instanceType == other.instanceType && useTuple == other.useTuple);
 }