private bool EqualsHelper(InvokeMemberByName other) { var genericArguments = GenericArguments; var otherGenericArguments = other.GenericArguments; return(Equals(other.Name, Name) && !(other.IsNameSpecial ^ IsNameSpecial) && !(otherGenericArguments == null ^ genericArguments == null) && (genericArguments == null || genericArguments.SequenceEqual(otherGenericArguments))); }
public bool Equals(InvokeMemberByName other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(EqualsHelper(other)); }
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); } }