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


C# XmlTextReader.ReadEndElement方法代码示例

本文整理汇总了C#中XmlTextReader.ReadEndElement方法的典型用法代码示例。如果您正苦于以下问题:C# XmlTextReader.ReadEndElement方法的具体用法?C# XmlTextReader.ReadEndElement怎么用?C# XmlTextReader.ReadEndElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XmlTextReader的用法示例。


在下文中一共展示了XmlTextReader.ReadEndElement方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PlatformBuildSettings

    public PlatformBuildSettings(XmlTextReader reader)
    {
        textureSettings = new List<TextureAssetSettings>(20);

        if(reader.MoveToAttribute("name"))
            platform = (Platform) System.Enum.Parse(typeof(Platform), reader.Value);
        while(reader.Read()) {
            if(reader.NodeType == XmlNodeType.EndElement && reader.Name == "Platform") {
                reader.ReadEndElement();
                break;
            }
            if(reader.NodeType == XmlNodeType.Element && reader.Name == "TextureAsset") {
                textureSettings.Add(new TextureAssetSettings(reader));
            }
        }
    }
开发者ID:azanium,项目名称:TruthNIslam-Unity,代码行数:16,代码来源:PlatformBuildSettings.cs

示例2: TextureAssetSettings

 public TextureAssetSettings(XmlTextReader reader)
 {
     if(reader.MoveToAttribute("path"))
         path = reader.Value;
     while(reader.Read()) {
         if(reader.NodeType == XmlNodeType.EndElement && reader.Name == "TextureAsset") {
             reader.ReadEndElement();
             break;
         }
         if(reader.NodeType == XmlNodeType.Element && reader.Name == "maxSize") {
             maxSize = int.Parse(reader.ReadInnerXml());
         } else if(reader.NodeType == XmlNodeType.Element && reader.Name == "format") {
             format = (TextureImporterFormat) System.Enum.Parse(typeof(TextureImporterFormat), reader.ReadInnerXml());
         } else if(reader.NodeType == XmlNodeType.Element && reader.Name == "mipmaps") {
             mipmaps = bool.Parse(reader.ReadInnerXml());
         } else if(reader.NodeType == XmlNodeType.Element && reader.Name == "npotScale") {
             npotScale = (TextureImporterNPOTScale) System.Enum.Parse(typeof(TextureImporterNPOTScale), reader.ReadInnerXml());
         }
     }
 }
开发者ID:azanium,项目名称:TruthNIslam-Unity,代码行数:20,代码来源:TextureAssetSettings.cs

示例3: FromXmlString

		public override void FromXmlString(string xmlString)
		{
			StringReader input = new StringReader(xmlString);
			XmlTextReader xmlTextReader = new XmlTextReader(input);
			this.class14_0 = (this.class14_1 = (this.class14_2 = (this.class14_3 = (this.class14_4 = (this.class14_5 = (this.class14_6 = (this.class14_7 = null)))))));
			while (true)
			{
				XmlNodeType xmlNodeType = xmlTextReader.MoveToContent();
				XmlNodeType xmlNodeType2 = xmlNodeType;
				switch (xmlNodeType2)
				{
				case XmlNodeType.None:
					return;
				case XmlNodeType.Element:
				{
					string name = xmlTextReader.Name;
					if (!this.method_15(xmlTextReader, name, "Modulus", ref this.class14_0) && !this.method_15(xmlTextReader, name, "Exponent", ref this.class14_1) && !this.method_15(xmlTextReader, name, "P", ref this.class14_2) && !this.method_15(xmlTextReader, name, "Q", ref this.class14_3) && !this.method_15(xmlTextReader, name, "DP", ref this.class14_4) && !this.method_15(xmlTextReader, name, "DQ", ref this.class14_5) && !this.method_15(xmlTextReader, name, "InverseQ", ref this.class14_6) && !this.method_15(xmlTextReader, name, "D", ref this.class14_7))
					{
						xmlTextReader.ReadString();
					}
					break;
				}
				default:
					if (xmlNodeType2 != XmlNodeType.EndElement)
					{
						goto Block_9;
					}
					xmlTextReader.ReadEndElement();
					break;
				}
			}
			Block_9:
			throw new ArgumentException();
		}
开发者ID:akordowski,项目名称:Source-Code-Nitriq,代码行数:34,代码来源:Class1.cs


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