コード例 #1
0
 public static IEnumerable <object[]> GetCanadianMPs()
 => DataFiles.GetXDocument("CanadianMPs.xml")?
 .Root?.Elements("MemberOfParliament")
 .Select(xe => new object[] {
     xe.Element("PersonShortHonorific")?.Value,
     xe.Element("PersonOfficialFirstName")?.Value,
     xe.Element("PersonOfficialLastName")?.Value,
 });
コード例 #2
0
 public static IEnumerable <object[]> GetAfricanNames()
 => DataFiles.GetXDocument("AfricanNames.xml")?
 .Root?.Elements("Person")
 .Select(xe => new object[] {
     xe.Element("FirstName")?.Value,
     xe.Element("LastName")?.Value,
     xe.Element("Name")?.Value,
 });