Esempio n. 1
0
        public virtual void NotifyChange(Bindable sourceObj, BindingEventArgs args)
        {
            if (IsSourceVar(sourceObj, args.VarName))
            {
                var arguments    = new List <BindPoint>(sources);
                var sourcesTuple = BindingArgumentMarshaller.MarshalArguments(arguments, arrow.a);

                dynamic        rawResults = arrow.Invoke(sourcesTuple);
                List <dynamic> results    = BindingArgumentMarshaller.UnmarshalArguments(rawResults);

                UpdateDestinations(results);
            }
        }
Esempio n. 2
0
        public override void NotifyChange(Bindable sourceObj, BindingEventArgs args)
        {
            base.NotifyChange(sourceObj, args);  // Will do the forward change if the changed
                                                 // object is the binding source
            // Otherwise we check if it's the destination variable, and if so run the arrow in
            // reverse
            if (IsDestinationVar(sourceObj, args.VarName))
            {
                var arguments         = new List <BindPoint>(destinations);
                var destinationsTuple = BindingArgumentMarshaller.MarshalArguments(arguments, arrow.b);

                dynamic        rawResults = reverseArrow.Invoke(destinationsTuple);
                List <dynamic> results    = BindingArgumentMarshaller.UnmarshalArguments(rawResults);

                UpdateSources(results);
            }
        }