Example #1
0
        private void GetEditorNodeKeyValue()
        {
            Type nodeType = LCReflect.GetType(Json.TypeFullName);

            FieldInfo[] fields = LCReflect.GetTypeFieldInfos(nodeType);

            for (int i = 0; i < fields.Length; i++)
            {
                FieldInfo          info = fields[i];
                NodeValueAttribute nodeValueAttribute = LCReflect.GetFieldAttr <NodeValueAttribute>(info);
                if (nodeValueAttribute != null)
                {
                    if (nodeValueAttribute.ViewEditor)
                    {
                        object defauleValue = LCReflect.GeTypeDefaultFieldValue(Json.TypeFullName, info.Name);
                        UpdateNodeKeyValue(info, defauleValue);
                    }
                }
            }
        }