예제 #1
0
        public JsonPropertiesInfo Execute(JSchema schema)
        {
            using (var editor = new JsonEditorHost(this, schema))
            {
                if (editor.Execute() == false)
                {
                    return(null);
                }

                return(editor.Read <JsonPropertiesInfo>());
            }
        }
예제 #2
0
        public static bool TryEdit <T>(ref T obj, JSchema schema)
        {
            using (var editor = new JsonEditorHost(obj, schema))
            {
                if (editor.Execute() == false)
                {
                    return(false);
                }

                obj = editor.Read <T>();
                return(true);
            }
        }