Exemplo n.º 1
0
 static Task <ObjectValue[]> GetChildrenAsync(ObjectValue value, int index, int count, CancellationToken cancellationToken)
 {
     return(Task.Run(() => {
         try {
             return value.GetRangeOfChildren(index, count);
         } catch (Exception ex) {
             // Note: this should only happen if someone breaks ObjectValue.GetAllChildren()
             LoggingService.LogError("Failed to get ObjectValue range of children.", ex);
             return new ObjectValue[0];
         }
     }, cancellationToken));
 }