//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // // Microsoft //------------------------------------------------------------------------------ namespace System.Xml.Serialization { using System.Reflection; using System; using System.Text; /// /// /// /// [To be supplied.] /// public class XmlMembersMapping : XmlMapping { XmlMemberMapping[] mappings; internal XmlMembersMapping(TypeScope scope, ElementAccessor accessor, XmlMappingAccess access) : base(scope, accessor, access) { MembersMapping mapping = (MembersMapping)accessor.Mapping; StringBuilder key = new StringBuilder(); key.Append(":"); mappings = new XmlMemberMapping[mapping.Members.Length]; for (int i = 0; i < mappings.Length; i++) { if (mapping.Members[i].TypeDesc.Type != null) { key.Append(GenerateKey(mapping.Members[i].TypeDesc.Type, null, null)); key.Append(":"); } mappings[i] = new XmlMemberMapping(mapping.Members[i]); } SetKeyInternal(key.ToString()); } /// /// /// [To be supplied.] /// public string TypeName { get { return Accessor.Mapping.TypeName; } } /// /// /// [To be supplied.] /// public string TypeNamespace { get { return Accessor.Mapping.Namespace; } } /// /// /// [To be supplied.] /// public XmlMemberMapping this[int index] { get { return mappings[index]; } } /// /// /// [To be supplied.] /// public int Count { get { return mappings.Length; } } } }