Changeset 17519 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs
- Timestamp:
- 04/27/20 15:53:26 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs
r17485 r17519 1 using System; 2 using System.Collections; 1 using System.Collections; 3 2 using System.Collections.Generic; 4 3 using System.Linq; … … 76 75 } 77 76 } 78 77 79 78 // TODO jsonIgnore dataType? 80 81 79 [JsonIgnore] 82 public virtual I List<IJsonItem> Children { get; protected set; }80 public virtual IEnumerable<IJsonItem> Children { get; protected set; } 83 81 84 82 [JsonIgnore] … … 104 102 if (Children == null) 105 103 Children = new List<IJsonItem>(); 106 foreach (var child in childs) { 107 Children.Add(child); 108 child.Parent = this; 104 if(Children is IList<IJsonItem> list) { 105 foreach (var child in childs) { 106 list.Add(child); 107 child.Parent = this; 108 } 109 109 } 110 110 }
Note: See TracChangeset
for help on using the changeset viewer.