Beispiel #1
0
 private void Init()
 {
     if (MemberTree == null)
     {
         MemberTree = new MemberTree(targets, serializedObject);
     }
 }
Beispiel #2
0
        public MemberNode(MemberTree tree, MemberNode parent, MethodInfo methodInfo, System.Object[] instances) : this(tree, parent, instances)
        {
            this.methodInfo = methodInfo;
            NodeType        = MemberNodeType.Method;
            Type            = methodInfo.GetType();

            Nodes = MemberTree.GenerateMemberNodes(tree, Instances, Type);
        }
Beispiel #3
0
        public MemberNode(MemberTree tree, MemberNode parent, PropertyInfo propertyInfo, System.Object[] instances) : this(tree, parent, instances)
        {
            this.propertyInfo = propertyInfo;
            NodeType          = MemberNodeType.Property;
            Type = propertyInfo.GetType();

            Nodes = MemberTree.GenerateMemberNodes(tree, Instances, Type);
        }
Beispiel #4
0
        public MemberNode(MemberTree tree, MemberNode parent, FieldInfo fieldInfo, System.Object[] instances) : this(tree, parent, instances)
        {
            this.fieldInfo = fieldInfo;
            NodeType       = MemberNodeType.Field;
            Type           = fieldInfo.FieldType;

            Nodes = MemberTree.GenerateMemberNodes(tree, Instances, Type);
        }
Beispiel #5
0
        internal static List <MemberNode> GenerateMemberNodes(MemberTree tree, System.Object[] parentInstances, Type type)
        {
            List <MemberNode> nodes = new List <MemberNode>();

            FieldInfo[] fieldInfos = type.GetFields();
            for (int i = 0; i < fieldInfos.Length; i++)
            {
                if (parentInstances != null)
                {
                    System.Object[] fieldInstances = new object[parentInstances.Length];

                    for (int j = 0; j < fieldInstances.Length; j++)
                    {
                        fieldInstances[j] = fieldInfos[i].GetValue(parentInstances[j]);
                    }
                }

                //nodes.Add(new MemberNode(tree, null, fieldInfos[i], fieldInstances));
            }

            return(nodes);
        }
Beispiel #6
0
 public MemberNode(MemberTree tree, MemberNode parent, System.Object[] instances)
 {
     Tree   = tree;
     Parent = parent;
 }