, " ". -- :
var mapping = (from XmlTypeCode cc in Enum.GetValues(typeof(XmlTypeCode))
let xt = XmlSchemaType.GetBuiltInSimpleType(cc)
where xt != null
group cc by xt.Datatype.ValueType into gg
select new { Type = gg.Key, XmlTypeCodes = gg.ToArray() })
.ToDictionary(m => m.Type, m => m.XmlTypeCodes);
:
System.Boolean => Boolean
System.Byte => UnsignedByte
System.Byte[] => HexBinary,Base64Binary
System.DateTime => DateTime,Time,Date,GYearMonth,GYear,GMonthDay,GDay,GMonth
System.Decimal => Decimal,Integer,NonPositiveInteger,NegativeInteger,NonNegative
Integer,PositiveInteger
...
"--" , , String. BCL, , , . MS, XmlTypeCode, , :
.ToDictionary(
m => m.Type,
m => m.Type != typeof(string) ? m.XmlTypeCodes.First() : XmlTypeCode.String);