Beispiel #1
0
 protected override void LoadChildren()
 {
     try
     {
         if (Element.Value.IsBsonArray)
         {
             foreach (var child in Element.Value.AsBsonArray)
             {
                 ResultItemViewModel item = new ResultItemViewModel(new BsonElement(Element.Value.AsBsonArray.IndexOf(child).ToString(), child));
                 Children.Add(item);
             }
         }
         else if (Element.Value.IsBsonDocument)
         {
             foreach (var child in Element.Value.AsBsonDocument)
             {
                 ResultItemViewModel item = new ResultItemViewModel(child);
                 Children.Add(item);
             }
         }
     }
     catch
     {
     }
 }
 protected override void LoadChildren()
 {
     try
     {
         foreach (var element in Result)
         {
             ResultItemViewModel item = new ResultItemViewModel(element);
             Children.Add(item);
         }
     }
     catch
     {
     }
 }
 protected override void LoadChildren()
 {
     try
     {
         if (Element.Value.IsBsonArray)
         {
             foreach (var child in Element.Value.AsBsonArray)
             {
                 ResultItemViewModel item = new ResultItemViewModel(new BsonElement(Element.Value.AsBsonArray.IndexOf(child).ToString(), child));
                 Children.Add(item);
             }
         }
         else if (Element.Value.IsBsonDocument)
         {
             foreach (var child in Element.Value.AsBsonDocument)
             {
                 ResultItemViewModel item = new ResultItemViewModel(child);
                 Children.Add(item);
             }
         }
     }
     catch
     {
     }
 }
 protected override void LoadChildren()
 {
     try
     {
         foreach (var element in Result)
         {
             ResultItemViewModel item = new ResultItemViewModel(element);
             Children.Add(item);
         }
     }
     catch
     {
     }
 }