IronPython.Runtime.Binding.MetaPythonFunction.BindSetMember C# (CSharp) Method

BindSetMember() public method

public BindSetMember ( SetMemberBinder binder, DynamicMetaObject value ) : DynamicMetaObject
binder SetMemberBinder
value DynamicMetaObject
return DynamicMetaObject
        public override DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicMetaObject value) {
            // fallback w/ an error suggestion that does a late bound set
            return binder.FallbackSetMember(
                this,
                value,
                new DynamicMetaObject(
                    Ast.Call(
                        typeof(PythonOps).GetMethod("PythonFunctionSetMember"),
                        AstUtils.Convert(
                            Expression,
                            typeof(PythonFunction)
                        ),
                        Expression.Constant(binder.Name),
                        AstUtils.Convert(
                            value.Expression,
                            typeof(object)
                        )
                    ),
                    BindingRestrictions.GetTypeRestriction(Expression, typeof(PythonFunction))
                )
            );
        }