public override PropertyTreeMetaObject StartStep( PropertyTreeMetaObject target, PropertyTreeNavigator self, NodeList children) { if (!(target is UntypedToTypedMetaObject)) return target; if (!children.Any()) return target; try { // TODO Only supports one child (lame spec) var rootType = target.Root.ComponentType; var types = children.Select(t => ConvertToType(t, rootType)).ToArray(); target = target.BindGenericParameters(types); } catch (Exception ex) { if (ex.IsCriticalException()) throw; Parent.errors.CouldNotBindGenericParameters(target.ComponentType, ex, self.FileLocation); } Parent.Bind(target, children.First(), null); children.Clear(); return target; }
public override PropertyTreeMetaObject Process( PropertyTreeBinderImpl parent, PropertyTreeMetaObject target, PropertyTreeNavigator self, NodeList children) { if (!(target is UntypedToTypedMetaObject)) { return(target); } if (!children.Any()) { return(target); } try { // TODO Only supports one child (lame spec) var rootType = target.Root.ComponentType; var types = children.Select(t => ConvertToType(t, rootType)).ToArray(); target = target.BindGenericParameters(types); } catch (PropertyTreeException) { throw; } catch (Exception ex) { if (ex.IsCriticalException()) { throw; } parent._errors.CouldNotBindGenericParameters(target.ComponentType, ex, self.FileLocation); } parent.Bind(target, children.First(), null); children.Clear(); return(target); }