You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -0,0 +1,68 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <copyright file="XmlMembersMapping.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
// <owner current="true" primary="true">[....]</owner>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Xml.Serialization {
|
||||
using System.Reflection;
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
/// <include file='doc\XmlMembersMapping.uex' path='docs/doc[@for="XmlMembersMapping"]/*' />
|
||||
///<internalonly/>
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
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());
|
||||
}
|
||||
|
||||
/// <include file='doc\XmlMembersMapping.uex' path='docs/doc[@for="XmlMembersMapping.TypeName"]/*' />
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public string TypeName {
|
||||
get { return Accessor.Mapping.TypeName; }
|
||||
}
|
||||
|
||||
/// <include file='doc\XmlMembersMapping.uex' path='docs/doc[@for="XmlMembersMapping.TypeNamespace"]/*' />
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public string TypeNamespace {
|
||||
get { return Accessor.Mapping.Namespace; }
|
||||
}
|
||||
|
||||
/// <include file='doc\XmlMembersMapping.uex' path='docs/doc[@for="XmlMembersMapping.this"]/*' />
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public XmlMemberMapping this[int index] {
|
||||
get { return mappings[index]; }
|
||||
}
|
||||
|
||||
/// <include file='doc\XmlMembersMapping.uex' path='docs/doc[@for="XmlMembersMapping.Count"]/*' />
|
||||
/// <devdoc>
|
||||
/// <para>[To be supplied.]</para>
|
||||
/// </devdoc>
|
||||
public int Count {
|
||||
get { return mappings.Length; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user