当前位置: 首页>>代码示例>>C#>>正文


C# XmlTypeCode.ToString方法代码示例

本文整理汇总了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()));
             
 }
开发者ID:o2platform,项目名称:O2.Platform.Projects,代码行数:7,代码来源:SimpleTypeCodeDomHelper.cs

示例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();
            }
        }
开发者ID:geoffkizer,项目名称:corefx,代码行数:97,代码来源:XmlSchemaDataType.cs

示例3: FormatCode

 private static string FormatCode(XmlTypeCode code)
 {
     var str = code.ToString();
     return char.ToLower(str[0]) + str.Substring(1);
 }
开发者ID:jasonhuber,项目名称:JobService_Jobs_Consumers,代码行数:5,代码来源:SDataSchemaTypeReference.cs


注:本文中的XmlTypeCode.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。