Example #1
0
 public static DocumentGroup FindByName(this IList<DocumentGroup> groups, string name)
 {
     return groups?.SingleOrDefault(g => g.Name.Equals(name, StringComparison.CurrentCultureIgnoreCase));
 }
Example #2
0
 public static DocumentGroup FindBySlot(this IList<DocumentGroup> groups, int index)
 {
     return groups?.SingleOrDefault(g => g.Slot == index);
 }
 public static string Url(this LinkResource[] links, string rel)
 {
     return links?.SingleOrDefault(l => l.Rel == rel)?.Href;
 }