コード例 #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
ファイル: JsonEditorHost.cs プロジェクト: teize001/Crema
        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);
            }
        }