本文整理汇总了C#中XmlReader.GetSubtreeReader方法的典型用法代码示例。如果您正苦于以下问题:C# XmlReader.GetSubtreeReader方法的具体用法?C# XmlReader.GetSubtreeReader怎么用?C# XmlReader.GetSubtreeReader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XmlReader
的用法示例。
在下文中一共展示了XmlReader.GetSubtreeReader方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadIssueTypes
/// <summary>
/// Loads the issue types inside the IssueTypes element.
/// </summary>
/// <param name="reader">The reader.</param>
private void LoadIssueTypes(XmlReader reader)
{
using(var localReader = reader.GetSubtreeReader())
{
while(localReader.ReadNext())
{
// contains solely IssueType elements
var issueType = new IssueType();
issueType.Load(localReader);
_knownIssueTypes.Add(issueType.Id, issueType);
}
}
}
示例2: LoadInformation
/// <summary>
/// Loads the information element
/// </summary>
/// <param name="reader">The reader.</param>
private void LoadInformation(XmlReader reader)
{
using(var localReader = reader.GetSubtreeReader())
{
while(localReader.ReadNext())
{
switch(localReader.LocalName)
{
case "Solution":
string readPath = localReader.ReadElementContentAsString();
this.SolutionPath = Path.GetFullPath(Path.Combine(_inspectCodePath, readPath));
break;
// rest is not interesting for now.
}
}
}
}
示例3: LoadIssues
/// <summary>
/// Loads the issues.
/// </summary>
/// <param name="reader">The reader.</param>
private void LoadIssues(XmlReader reader)
{
using(var localReader = reader.GetSubtreeReader())
{
while(localReader.ReadNext())
{
// contains solely project nodes
var project = new Project(this);
project.Load(localReader);
_projects.Add(project);
}
}
}