Esempio n. 1
0
 public static bool TryGetChildren(this IEnumerable <IOPointer> p, SheetsIO.ReadObjectDelegate create, out ArrayList list)
 {
     list = new ArrayList();
     foreach (var child in p)
     {
         if (create(child, out var childObj) || child.Optional)
         {
             list.Add(childObj);
         }
         else
         {
             return(false);
         }
     }
     return(true);
 }
Esempio n. 2
0
 public static bool TryCreateFromChildren(this IOPointer p, SheetsIO.ReadObjectDelegate create, Func <IOPointer, IEnumerable <IOPointer> > func, out object result) =>
 (result = func(p).TryGetChildren(create, out var childrenList) || p.IsValidContent(childrenList)