internal static void InvokeSubtractAssignCallSite(object target, string name, object[] arguments, string[] argumentNames, Type context, bool staticContext, ref CallSite callSiteIsEvent, ref CallSite callSiteRemove, ref CallSite callSiteGet, ref CallSite callSiteSet) { if (InvokeIsEventCallSite(target, name, context, ref callSiteIsEvent)) { InvokeMemberActionCallSite(target, InvokeMemberByName.CreateSpecialName("remove_" + name), arguments, argumentNames, context, staticContext, ref callSiteRemove); } else { dynamic tGet = InvokeGetCallSite(target, name, context, staticContext, ref callSiteGet); tGet -= (arguments[0]); InvocationMapping.InvokeSetCallSite(target, name, tGet, context, staticContext, ref callSiteSet); } }
internal static void InvokeAddAssignCallSite(object target, string name, object[] arguments, string[] argumentNames, Type context, bool staticContext, ref CallSite callSiteIsEvent, ref CallSite callSiteAdd, ref CallSite callSiteGet, ref CallSite callSiteSet) { if (InvokeIsEventCallSite(target, name, context, ref callSiteIsEvent)) { InvokeMemberActionCallSite(target, InvokeMemberByName.CreateSpecialName("add_" + name), arguments, argumentNames, context, staticContext, ref callSiteAdd); } else { dynamic theGet = InvokeGetCallSite(target, name, context, staticContext, ref callSiteGet); theGet += (arguments[0]); InvokeSetCallSite(target, name, theGet, context, staticContext, ref callSiteSet); } }