示例#1
0
        public static ChildGroupPack Read(GroupAdapter groupAdapter)
        {
#if DEBUG
            if (DebugMode)
            {
                Debug.Log(string.Format(@"Read"));
            }
#endif
            ChildGroupPack childGroupPack = new ChildGroupPack(groupAdapter);

            var groupDescriptors = DesignerReflection.GetChildGroupsReferences(groupAdapter);

            foreach (ChildGroupDescriptor groupDescriptor in groupDescriptors)
            {
                List <ComponentAdapter> adapters = Core.Reflection.CoreReflector.GetMemberValue(groupDescriptor.CollectionMemberInfo, groupAdapter) as List <ComponentAdapter>;

                ChildGroup childGroup = new ChildGroup(adapters)
                {
                    GroupName = groupDescriptor.CollectionMemberInfo.Name
                };
                childGroupPack.Add(childGroup);
            }

#if DEBUG
            if (DebugMode)
            {
                Debug.Log("Read. childGroupPack: " + childGroupPack);
            }
#endif

            return(childGroupPack);
        }
示例#2
0
 public void Add(ChildGroup group)
 {
     _groups.Add(group);
 }
示例#3
0
 public void Add(ChildGroup group)
 {
     _groups.Add(group);
 }
示例#4
0
        public static ChildGroupPack Read(GroupAdapter groupAdapter)
        {
#if DEBUG
            if (DebugMode)
            {
                Debug.Log(string.Format(@"Read"));
            }
#endif
            ChildGroupPack childGroupPack = new ChildGroupPack(groupAdapter);

            var groupDescriptors = DesignerReflection.GetChildGroupsReferences(groupAdapter);

            foreach (ChildGroupDescriptor groupDescriptor in groupDescriptors)
            {
                List<ComponentAdapter> adapters = Core.Reflection.CoreReflector.GetMemberValue(groupDescriptor.CollectionMemberInfo, groupAdapter) as List<ComponentAdapter>;

                ChildGroup childGroup = new ChildGroup(adapters)
                {
                    GroupName = groupDescriptor.CollectionMemberInfo.Name
                };
                childGroupPack.Add(childGroup);
            }

#if DEBUG
            if (DebugMode)
            {
                Debug.Log("Read. childGroupPack: " + childGroupPack);
            }
#endif

            return childGroupPack;
        }