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)); } }
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)); } }