本文整理汇总了C#中XmlTypeCode.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# XmlTypeCode.ToString方法的具体用法?C# XmlTypeCode.ToString怎么用?C# XmlTypeCode.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XmlTypeCode
的用法示例。
在下文中一共展示了XmlTypeCode.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateGetBuiltInSimpleType
internal static CodeExpression CreateGetBuiltInSimpleType(XmlTypeCode typeCode) {
return CodeDomHelper.CreateMethodCall(
new CodeTypeReferenceExpression("XmlSchemaType"),
Constants.GetBuiltInSimpleType,
CodeDomHelper.CreateFieldReference(Constants.XmlTypeCode, typeCode.ToString()));
}
示例2: TypeCodeToString
internal string TypeCodeToString(XmlTypeCode typeCode)
{
switch (typeCode)
{
case XmlTypeCode.None:
return "None";
case XmlTypeCode.Item:
return "AnyType";
case XmlTypeCode.AnyAtomicType:
return "AnyAtomicType";
case XmlTypeCode.String:
return "String";
case XmlTypeCode.Boolean:
return "Boolean";
case XmlTypeCode.Decimal:
return "Decimal";
case XmlTypeCode.Float:
return "Float";
case XmlTypeCode.Double:
return "Double";
case XmlTypeCode.Duration:
return "Duration";
case XmlTypeCode.DateTime:
return "DateTime";
case XmlTypeCode.Time:
return "Time";
case XmlTypeCode.Date:
return "Date";
case XmlTypeCode.GYearMonth:
return "GYearMonth";
case XmlTypeCode.GYear:
return "GYear";
case XmlTypeCode.GMonthDay:
return "GMonthDay";
case XmlTypeCode.GDay:
return "GDay";
case XmlTypeCode.GMonth:
return "GMonth";
case XmlTypeCode.HexBinary:
return "HexBinary";
case XmlTypeCode.Base64Binary:
return "Base64Binary";
case XmlTypeCode.AnyUri:
return "AnyUri";
case XmlTypeCode.QName:
return "QName";
case XmlTypeCode.Notation:
return "Notation";
case XmlTypeCode.NormalizedString:
return "NormalizedString";
case XmlTypeCode.Token:
return "Token";
case XmlTypeCode.Language:
return "Language";
case XmlTypeCode.NmToken:
return "NmToken";
case XmlTypeCode.Name:
return "Name";
case XmlTypeCode.NCName:
return "NCName";
case XmlTypeCode.Id:
return "Id";
case XmlTypeCode.Idref:
return "Idref";
case XmlTypeCode.Entity:
return "Entity";
case XmlTypeCode.Integer:
return "Integer";
case XmlTypeCode.NonPositiveInteger:
return "NonPositiveInteger";
case XmlTypeCode.NegativeInteger:
return "NegativeInteger";
case XmlTypeCode.Long:
return "Long";
case XmlTypeCode.Int:
return "Int";
case XmlTypeCode.Short:
return "Short";
case XmlTypeCode.Byte:
return "Byte";
case XmlTypeCode.NonNegativeInteger:
return "NonNegativeInteger";
case XmlTypeCode.UnsignedLong:
return "UnsignedLong";
case XmlTypeCode.UnsignedInt:
return "UnsignedInt";
case XmlTypeCode.UnsignedShort:
return "UnsignedShort";
case XmlTypeCode.UnsignedByte:
return "UnsignedByte";
case XmlTypeCode.PositiveInteger:
return "PositiveInteger";
default:
return typeCode.ToString();
}
}
示例3: FormatCode
private static string FormatCode(XmlTypeCode code)
{
var str = code.ToString();
return char.ToLower(str[0]) + str.Substring(1);
}