public override PropertyTreeMetaObject EndStep(PropertyTreeMetaObject target)
            {
                if (target.ShouldConstruct) {
                    var ctor = target.GetDefinition().Constructor;

                    if (ctor != null)
                        return target.BindConstructor(ctor, Empty<string, PropertyTreeMetaObject>.ReadOnlyDictionary);
                }
                return target;
            }
예제 #2
0
            public override PropertyTreeMetaObject Process(PropertyTreeBinderImpl parent, PropertyTreeMetaObject target, PropertyTreeNavigator self, NodeList children)
            {
                if (target.ShouldConstruct)
                {
                    var ctor = target.GetDefinition().Constructor;

                    if (ctor != null)
                    {
                        return(target.BindConstructor(ctor, Empty <string, PropertyTreeMetaObject> .ReadOnlyDictionary));
                    }
                }
                return(target);
            }
            public override PropertyTreeMetaObject StartStep(PropertyTreeMetaObject target, PropertyTreeNavigator self, NodeList children)
            {
                QualifiedName name = self.QualifiedName;
                var ctor = PropertyTreeDefinition.FromType(target.ComponentType).Constructor;

                if (target.ShouldConstruct && ctor != null) {
                    OperatorDefinition op = ctor;
                    var args = ExtractParameterDictionary(op, target, Parent.GetBasicServices(self), children);

                    target = target.BindConstructor(ctor, args);
                }

                return target;
            }
            public override PropertyTreeMetaObject Process(PropertyTreeBinderImpl parent, PropertyTreeMetaObject target, PropertyTreeNavigator self, NodeList children)
            {
                QualifiedName name = self.QualifiedName;
                var           ctor = PropertyTreeDefinition.FromType(target.ComponentType).Constructor;

                if (target.ShouldConstruct && ctor != null)
                {
                    OperatorDefinition op = ctor;
                    var args = parent.ExtractParameterDictionary(op, target, parent.GetBasicServices(self), children);

                    target = target.BindConstructor(ctor, args);
                }

                return(target);
            }
 public override PropertyTreeMetaObject BindConstructor(OperatorDefinition definition, IReadOnlyDictionary <string, PropertyTreeMetaObject> arguments)
 {
     return(new BuilderMetaObject(inner.BindConstructor(definition, arguments)));
 }