Beispiel #1
0
            public override DynamicMetaObject BindGetMember(GetMemberBinder binder)
            {
                if (!(Value is KumaBoxedInstance) && Value.BackingObject != null)
                {
                    KumaBoxedInstance.SyncInstanceVariablesFrom(Value, Value.BackingObject);
                }
                var dmo = InteropBinder.GetMember.Bind(new InteropBinder.GetMember(binder.Name, Scope),
                                                       this);

                if (!(Value is KumaBoxedInstance) && Value.BackingObject != null)
                {
                    KumaBoxedInstance.SyncInstanceVariablesTo(Value, Value.BackingObject);
                }
                return(dmo);
            }
Beispiel #2
0
            public override DynamicMetaObject BindInvokeMember(InvokeMemberBinder binder,
                                                               params DynamicMetaObject[] args)
            {
                if (!(Value is KumaBoxedInstance) && Value.BackingObject != null)
                {
                    KumaBoxedInstance.SyncInstanceVariablesFrom(Value, Value.BackingObject);
                }
                var dmo =
                    InteropBinder.InvokeMember.Bind(
                        new InteropBinder.InvokeMember(binder.Name, binder.CallInfo, Scope), this, args);

                if (!(Value is KumaBoxedInstance) && Value.BackingObject != null)
                {
                    KumaBoxedInstance.SyncInstanceVariablesTo(Value, Value.BackingObject);
                }
                return(dmo);
            }