static public EditGadget New(EditTarget target, Variable variable, AttachEditGadgetAttribute attribute) { Type object_type = target.GetTargetType(); return(new EditGadget(target, variable, attribute.GetActionPaths().ConvertValuesOfPair(p => object_type.GetActionByPath(p)), attribute.GetVariablePaths().ConvertValuesOfPair(p => object_type.GetVariableByPath(p)) )); }
protected override Tuple <bool, bool, Type> PullState() { if (target.IsValid()) { return(Tuple.New( target.IsSerializationCorrupt(), GetLayoutState().ShouldAlwaysShowRecoveryFields(), target.GetTargetType() )); } return(new Tuple <bool, bool, Type>()); }
protected override Type PullState() { return(target.GetTargetType()); }
static public EditProperty_Array ForcePropertyArray(this EditTarget item, string path) { return(item.ForceProperty(path) .Convert <EditProperty_Array>() .AssertNotNull(() => new MissingFieldException("The property for type " + item.GetTargetType() + " at path " + path + " cannot be treated as an arrary."))); }