Esempio n. 1
0
 internal static void InvokeSubtractAssignCallSite(object target, string name, object[] args, string[] argNames, Type context, bool staticContext,                // lgtm [cs/too-many-ref-parameters]
                                                   ref CallSite callSiteIsEvent, ref CallSite callSiteRemove, ref CallSite callSiteGet, ref CallSite callSiteSet) //This is an optimization readability isn't the concern.
 {
     if (InvokeIsEventCallSite(target, name, context, ref callSiteIsEvent))
     {
         InvokeMemberActionCallSite(target, InvokeMemberName.CreateSpecialName("remove_" + name), args, argNames, context, staticContext, ref callSiteRemove);
     }
     else
     {
         dynamic tGet = InvokeGetCallSite(target, name, context, staticContext, ref callSiteGet);
         tGet -= (dynamic)(args[0]);
         InvokeHelper.InvokeSetCallSite(target, name, tGet, context, staticContext, ref callSiteSet);
     }
 }