public ComponentBlueprint(int index, IComponent component)
        {
            _type = component.GetType();
            _componentMembers = null;

            this.index = index;
            this.fullTypeName = _type.FullName;

            var memberInfos = _type.GetPublicMemberInfos();
            members = new SerializableMember[memberInfos.Count];
            for (int i = 0, memberInfosLength = memberInfos.Count; i < memberInfosLength; i++) {
                var info = memberInfos[i];
                members[i] = new SerializableMember(info.name, info.GetValue(component));
            }
        }
Beispiel #2
0
        public ComponentBlueprint(int index, IComponent component)
        {
            _type             = component.GetType();
            _componentMembers = null;

            this.index        = index;
            this.fullTypeName = _type.FullName;

            var memberInfos = _type.GetPublicMemberInfos();

            members = new SerializableMember[memberInfos.Count];
            for (int i = 0, memberInfosLength = memberInfos.Count; i < memberInfosLength; i++)
            {
                var info = memberInfos[i];
                members[i] = new SerializableMember(info.name, info.GetValue(component));
            }
        }