Example #1
0
    internal static void InitializeCallSite(CallSite site)
    {
        Type type = typeof(IKVM.Runtime.IndyCallSite <>).MakeGenericType(MethodHandleUtil.GetDelegateTypeForInvokeExact(site.type()));

        IKVM.Runtime.IIndyCallSite ics = (IKVM.Runtime.IIndyCallSite)Activator.CreateInstance(type, true);
        System.Threading.Interlocked.CompareExchange(ref site.ics, ics, null);
    }