private IList <ColumnDescriptor> ListAllChildren(ColumnDescriptor parent) { var result = new List <ColumnDescriptor>(); if (parent.CollectionInfo != null && parent.CollectionInfo.IsDictionary) { if (ShowAdvancedFields) { result.Add(parent.ResolveChild("Key")); // Not L10N } result.AddRange(ListAllChildren(parent.ResolveChild("Value"))); // Not L10N return(result); } foreach (var child in parent.GetChildColumns()) { var collectionColumn = child.GetCollectionColumn(); // ReSharper disable once ConvertIfStatementToNullCoalescingExpression if (null != collectionColumn) { result.Add(collectionColumn); } else { result.Add(child); } } return(result); }
public NodeData(ColumnDescriptor treeColumn) { TreeColumn = treeColumn; if (treeColumn.CollectionInfo != null && treeColumn.CollectionInfo.IsDictionary) { ValueColumn = treeColumn.ResolveChild("Value"); // Not L10N } ValueColumn = ValueColumn ?? TreeColumn; }
public NodeData(ColumnDescriptor treeColumn) { TreeColumn = treeColumn; if (treeColumn.CollectionInfo != null && treeColumn.CollectionInfo.IsDictionary) { ValueColumn = treeColumn.ResolveChild("Value"); // Not L10N } ValueColumn = ValueColumn ?? TreeColumn; }
private IList<ColumnDescriptor> ListAllChildren(ColumnDescriptor parent) { var result = new List<ColumnDescriptor>(); if (parent.CollectionInfo != null && parent.CollectionInfo.IsDictionary) { if (ShowAdvancedFields) { result.Add(parent.ResolveChild("Key")); // Not L10N } result.AddRange(ListAllChildren(parent.ResolveChild("Value"))); // Not L10N return result; } foreach (var child in parent.GetChildColumns()) { var collectionColumn = child.GetCollectionColumn(); // ReSharper disable once ConvertIfStatementToNullCoalescingExpression if (null != collectionColumn) { result.Add(collectionColumn); } else { result.Add(child); } } return result; }