예제 #1
0
        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))
                                  ));
        }
예제 #2
0
        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>());
        }
예제 #3
0
 protected override Type PullState()
 {
     return(target.GetTargetType());
 }
예제 #4
0
 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.")));
 }