本文整理汇总了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));
}
}
}
示例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());
}
}
}
示例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();
}