/// <summary> /// When overridden in a derived class provides the non-Meta implementation of deleting a member. /// /// When not overridden the call site requesting the binder determines the behavior. /// </summary> public virtual bool TryDeleteMember(DeleteMemberBinder binder) { throw new NotSupportedException(); }
public override MetaObject BindDeleteMember(DeleteMemberBinder binder) { ContractUtils.RequiresNotNull(binder, "binder"); ExpandoClass klass; int index; ExpandoClass originalClass = GetClassEnsureIndex(binder.Name, binder.IgnoreCase, out klass, out index); string methodName = binder.IgnoreCase ? "ExpandoDeleteValueIgnoreCase" : "ExpandoDeleteValue"; return new MetaObject( AddDynamicTestAndDefer( binder, new MetaObject[] { this }, klass, originalClass, Expression.Convert( Expression.Call( typeof(RuntimeOps).GetMethod(methodName), GetLimitedSelf(), Expression.Constant(klass), Expression.Constant(index) ), typeof(object) ) ), GetRestrictions() ); }
public virtual MetaObject BindDeleteMember(DeleteMemberBinder binder) { ContractUtils.RequiresNotNull(binder, "binder"); return(binder.FallbackDeleteMember(this)); }
public override MetaObject BindDeleteMember(DeleteMemberBinder binder) { if (IsOverridden("TryDeleteMember")) { return CallMethodNoResult("TryDeleteMember", binder, NoArgs, (e) => binder.FallbackDeleteMember(this, e)); } return base.BindDeleteMember(binder); }
public override bool Equals(object obj) { DeleteMemberBinder dma = obj as DeleteMemberBinder; return(dma != null && dma._name == _name && dma._ignoreCase == _ignoreCase); }
public virtual MetaObject BindDeleteMember(DeleteMemberBinder binder) { ContractUtils.RequiresNotNull(binder, "binder"); return binder.FallbackDeleteMember(this); }