Changeset 17435
- Timestamp:
- 02/11/20 17:35:28 (5 years ago)
- Location:
- branches/3026_IntegrationIntoSymSpace
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Shared/JsonItemBaseControl.Designer.cs
r17433 r17435 79 79 this.textBoxName.Location = new System.Drawing.Point(92, 23); 80 80 this.textBoxName.Name = "textBoxName"; 81 this.textBoxName.ReadOnly = true;82 81 this.textBoxName.Size = new System.Drawing.Size(404, 20); 83 82 this.textBoxName.TabIndex = 10; -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.Designer.cs
r17406 r17435 31 31 this.panel = new System.Windows.Forms.Panel(); 32 32 this.jsonItemBindingSource = new System.Windows.Forms.BindingSource(this.components); 33 this.resultItems = new System.Windows.Forms.CheckedListBox(); 34 this.groupBox2 = new System.Windows.Forms.GroupBox(); 35 this.groupBox3 = new System.Windows.Forms.GroupBox(); 36 this.splitContainer1 = new System.Windows.Forms.SplitContainer(); 37 this.splitContainer2 = new System.Windows.Forms.SplitContainer(); 33 38 this.groupBoxDetails.SuspendLayout(); 34 39 ((System.ComponentModel.ISupportInitialize)(this.jsonItemBindingSource)).BeginInit(); 40 this.groupBox2.SuspendLayout(); 41 this.groupBox3.SuspendLayout(); 42 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); 43 this.splitContainer1.Panel1.SuspendLayout(); 44 this.splitContainer1.Panel2.SuspendLayout(); 45 this.splitContainer1.SuspendLayout(); 46 ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); 47 this.splitContainer2.Panel1.SuspendLayout(); 48 this.splitContainer2.Panel2.SuspendLayout(); 49 this.splitContainer2.SuspendLayout(); 35 50 this.SuspendLayout(); 36 51 // … … 43 58 // exportButton 44 59 // 45 this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 46 this.exportButton.Location = new System.Drawing.Point(801, 687); 60 this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 61 | System.Windows.Forms.AnchorStyles.Right))); 62 this.exportButton.Location = new System.Drawing.Point(3, 570); 47 63 this.exportButton.Name = "exportButton"; 48 this.exportButton.Size = new System.Drawing.Size( 121, 34);64 this.exportButton.Size = new System.Drawing.Size(422, 29); 49 65 this.exportButton.TabIndex = 1; 50 66 this.exportButton.Text = "Export"; … … 54 70 // treeView 55 71 // 56 this.treeView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 57 | System.Windows.Forms.AnchorStyles.Left))); 58 this.treeView.Location = new System.Drawing.Point(12, 12); 72 this.treeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 73 | System.Windows.Forms.AnchorStyles.Left) 74 | System.Windows.Forms.AnchorStyles.Right))); 75 this.treeView.Location = new System.Drawing.Point(6, 19); 59 76 this.treeView.Name = "treeView"; 60 this.treeView.Size = new System.Drawing.Size(3 42, 669);77 this.treeView.Size = new System.Drawing.Size(353, 327); 61 78 this.treeView.TabIndex = 3; 62 79 this.treeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_AfterSelect); … … 68 85 | System.Windows.Forms.AnchorStyles.Right))); 69 86 this.groupBoxDetails.Controls.Add(this.panel); 70 this.groupBoxDetails.Location = new System.Drawing.Point(3 60, 12);87 this.groupBoxDetails.Location = new System.Drawing.Point(3, 3); 71 88 this.groupBoxDetails.Name = "groupBoxDetails"; 72 this.groupBoxDetails.Size = new System.Drawing.Size( 562, 669);89 this.groupBoxDetails.Size = new System.Drawing.Size(422, 561); 73 90 this.groupBoxDetails.TabIndex = 4; 74 91 this.groupBoxDetails.TabStop = false; … … 83 100 this.panel.Location = new System.Drawing.Point(7, 20); 84 101 this.panel.Name = "panel"; 85 this.panel.Size = new System.Drawing.Size( 549, 643);102 this.panel.Size = new System.Drawing.Size(409, 535); 86 103 this.panel.TabIndex = 0; 87 104 // … … 89 106 // 90 107 this.jsonItemBindingSource.DataSource = typeof(HeuristicLab.JsonInterface.IJsonItem); 108 // 109 // resultItems 110 // 111 this.resultItems.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 112 | System.Windows.Forms.AnchorStyles.Left) 113 | System.Windows.Forms.AnchorStyles.Right))); 114 this.resultItems.FormattingEnabled = true; 115 this.resultItems.Location = new System.Drawing.Point(6, 19); 116 this.resultItems.Name = "resultItems"; 117 this.resultItems.Size = new System.Drawing.Size(353, 199); 118 this.resultItems.TabIndex = 5; 119 // 120 // groupBox2 121 // 122 this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 123 | System.Windows.Forms.AnchorStyles.Left) 124 | System.Windows.Forms.AnchorStyles.Right))); 125 this.groupBox2.Controls.Add(this.treeView); 126 this.groupBox2.Location = new System.Drawing.Point(3, 3); 127 this.groupBox2.Name = "groupBox2"; 128 this.groupBox2.Size = new System.Drawing.Size(365, 352); 129 this.groupBox2.TabIndex = 6; 130 this.groupBox2.TabStop = false; 131 this.groupBox2.Text = "Elements"; 132 // 133 // groupBox3 134 // 135 this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 136 | System.Windows.Forms.AnchorStyles.Left) 137 | System.Windows.Forms.AnchorStyles.Right))); 138 this.groupBox3.Controls.Add(this.resultItems); 139 this.groupBox3.Location = new System.Drawing.Point(3, 3); 140 this.groupBox3.Name = "groupBox3"; 141 this.groupBox3.Size = new System.Drawing.Size(365, 231); 142 this.groupBox3.TabIndex = 7; 143 this.groupBox3.TabStop = false; 144 this.groupBox3.Text = "Result Elements"; 145 // 146 // splitContainer1 147 // 148 this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 149 | System.Windows.Forms.AnchorStyles.Left) 150 | System.Windows.Forms.AnchorStyles.Right))); 151 this.splitContainer1.Location = new System.Drawing.Point(3, 3); 152 this.splitContainer1.Name = "splitContainer1"; 153 this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; 154 // 155 // splitContainer1.Panel1 156 // 157 this.splitContainer1.Panel1.Controls.Add(this.groupBox2); 158 // 159 // splitContainer1.Panel2 160 // 161 this.splitContainer1.Panel2.Controls.Add(this.groupBox3); 162 this.splitContainer1.Size = new System.Drawing.Size(371, 599); 163 this.splitContainer1.SplitterDistance = 358; 164 this.splitContainer1.TabIndex = 8; 165 // 166 // splitContainer2 167 // 168 this.splitContainer2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 169 | System.Windows.Forms.AnchorStyles.Left) 170 | System.Windows.Forms.AnchorStyles.Right))); 171 this.splitContainer2.Location = new System.Drawing.Point(12, 12); 172 this.splitContainer2.Name = "splitContainer2"; 173 // 174 // splitContainer2.Panel1 175 // 176 this.splitContainer2.Panel1.Controls.Add(this.splitContainer1); 177 // 178 // splitContainer2.Panel2 179 // 180 this.splitContainer2.Panel2.Controls.Add(this.groupBoxDetails); 181 this.splitContainer2.Panel2.Controls.Add(this.exportButton); 182 this.splitContainer2.Size = new System.Drawing.Size(809, 605); 183 this.splitContainer2.SplitterDistance = 377; 184 this.splitContainer2.TabIndex = 9; 91 185 // 92 186 // ExportJsonDialog … … 94 188 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 95 189 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 96 this.ClientSize = new System.Drawing.Size(934, 733); 97 this.Controls.Add(this.groupBoxDetails); 98 this.Controls.Add(this.treeView); 99 this.Controls.Add(this.exportButton); 190 this.ClientSize = new System.Drawing.Size(833, 629); 191 this.Controls.Add(this.splitContainer2); 100 192 this.Name = "ExportJsonDialog"; 101 193 this.RightToLeft = System.Windows.Forms.RightToLeft.No; … … 104 196 this.groupBoxDetails.ResumeLayout(false); 105 197 ((System.ComponentModel.ISupportInitialize)(this.jsonItemBindingSource)).EndInit(); 198 this.groupBox2.ResumeLayout(false); 199 this.groupBox3.ResumeLayout(false); 200 this.splitContainer1.Panel1.ResumeLayout(false); 201 this.splitContainer1.Panel2.ResumeLayout(false); 202 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 203 this.splitContainer1.ResumeLayout(false); 204 this.splitContainer2.Panel1.ResumeLayout(false); 205 this.splitContainer2.Panel2.ResumeLayout(false); 206 ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); 207 this.splitContainer2.ResumeLayout(false); 106 208 this.ResumeLayout(false); 107 209 … … 117 219 private System.Windows.Forms.GroupBox groupBoxDetails; 118 220 private System.Windows.Forms.Panel panel; 221 private System.Windows.Forms.CheckedListBox resultItems; 222 private System.Windows.Forms.GroupBox groupBox2; 223 private System.Windows.Forms.GroupBox groupBox3; 224 private System.Windows.Forms.SplitContainer splitContainer1; 225 private System.Windows.Forms.SplitContainer splitContainer2; 119 226 } 120 227 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.cs
r17432 r17435 22 22 private IList<JsonItemVMBase> VMs { get; set; } 23 23 private JCGenerator Generator { get; set; } = new JCGenerator(); 24 private IDictionary<string, IJsonItem> ResultItems = new Dictionary<string, IJsonItem>(); 24 25 25 26 private IContent content; … … 31 32 VMs = new List<JsonItemVMBase>(); 32 33 treeView.Nodes.Clear(); 34 ResultItems.Clear(); 33 35 34 36 Optimizer = content as IOptimizer; 35 37 Root = JsonItemConverter.Extract(Optimizer); 36 38 TreeNode parent = new TreeNode(Root.Name); 37 39 38 40 BuildTreeNode(parent, Root); 39 41 treeView.Nodes.Add(parent); … … 63 65 x.Item.Parent.Children.Remove(x.Item); 64 66 } 67 } 68 69 foreach(var x in ResultItems.Values) { 70 x.Parent.Children.Remove(x); 71 } 72 73 foreach(var x in resultItems.CheckedItems) { 74 if(ResultItems.TryGetValue((string)x, out IJsonItem item)) { 75 Root.AddChildren(item); 76 } 77 } 78 79 IList<IJsonItem> faultyItems = new List<IJsonItem>(); 80 if(!Root.GetValidator().Validate(ref faultyItems)) { 81 //print faultyItems 65 82 } 66 83 … … 95 112 if (IsDrawableItem(c)) { 96 113 if (c is ResultItem) { 97 114 resultItems.Items.Add(c.Name, true); 115 ResultItems.Add(c.Name, c); 98 116 } else { 99 117 TreeNode childNode = new TreeNode(c.Name); -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Constants.cs
r17405 r17435 12 12 13 13 internal const string Metadata = "Metadata"; 14 internal const string Optimizer = "Optimizer"; 15 internal const string Problem = "Problem"; 14 internal const string TemplateName = "TemplateName"; 16 15 internal const string HLFileLocation = "HLFileLocation"; 17 16 internal const string Parameters = "Parameters"; … … 20 19 internal const string Template = @"{ 21 20 '" + Metadata + @"': { 22 '" + Optimizer + @"':'', 23 '" + Problem + @"':'', 21 '" + TemplateName + @"':'', 24 22 '" + HLFileLocation + @"':'' 25 23 }, -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/AlgorithmConverter.cs
r17433 r17435 7 7 using HeuristicLab.Optimization; 8 8 9 namespace HeuristicLab.JsonInterface .Converters{9 namespace HeuristicLab.JsonInterface { 10 10 public class AlgorithmConverter : ParameterizedItemConverter { 11 11 public override int Priority => 30; … … 27 27 item.AddChildren(new ResultItem() { 28 28 Name = res.Name, 29 Description = value.ItemDescription,29 Description = res.Description, 30 30 Value = true, 31 31 Range = new object[] { true, false } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs
r17410 r17435 9 9 using Newtonsoft.Json.Linq; 10 10 using HEAL.Attic; 11 using System.IO; 11 12 12 13 namespace HeuristicLab.JsonInterface { … … 15 16 /// </summary> 16 17 public class JCGenerator { 17 private JObject Template { get; set; } = JObject.Parse(Constants.Template);18 private JArray JArrayItems { get; set; }19 private IList<IJsonItem> JsonItems { get; set; }20 private IOptimizer Optimizer { get; set; }21 18 22 23 public string GenerateTemplate(IOptimizer optimizer) { 24 // data container 25 JArrayItems = new JArray(); 26 JArray ResultItems = new JArray(); 27 JsonItems = new List<IJsonItem>(); 19 public void GenerateTemplate(string path, IOptimizer optimizer) => 20 GenerateTemplate(path, optimizer.Name, optimizer); 28 21 22 public void GenerateTemplate(string path, string templateName, IOptimizer optimizer) => 23 GenerateTemplate(path, templateName, optimizer, JsonItemConverter.Extract(optimizer)); 24 25 public void GenerateTemplate(string path, string templateName, IOptimizer optimizer, IJsonItem rootItem) { 26 // init 27 JObject template = JObject.Parse(Constants.Template); 28 JArray parameterItems = new JArray(); 29 JArray resultItems = new JArray(); 30 IList<IJsonItem> jsonItems = new List<IJsonItem>(); 31 string fullPath = Path.GetDirectoryName(Path.GetFullPath(path)); 32 33 // recursively filter items with values/ranges/actualNames 34 PopulateJsonItems(rootItem, jsonItems); 35 36 // serialize hl file 29 37 ProtoBufSerializer serializer = new ProtoBufSerializer(); 30 s erializer.Serialize(optimizer, @"C:\Workspace\template.hl");31 Template[Constants.Metadata][Constants.HLFileLocation] = @"C:\Workspace\template.hl";38 string hlFilePath = fullPath + @"\" + templateName + ".hl"; 39 serializer.Serialize(optimizer, hlFilePath); 32 40 33 // extract JsonItem, save the name in the metadata section of the 34 // template and save it an JArray incl. all parameters of the JsonItem, 35 // which have parameters aswell 36 AddIItem(optimizer); 37 // save the JArray with JsonItems (= IParameterizedItems) 41 // filter result items 42 foreach (var item in jsonItems) { 43 if (item is ResultItem) 44 resultItems.Add(Serialize(item)); 45 else 46 parameterItems.Add(Serialize(item)); 47 } 48 49 // set template data 50 template[Constants.Metadata][Constants.TemplateName] = templateName; 51 template[Constants.Metadata][Constants.HLFileLocation] = hlFilePath; 52 template[Constants.Parameters] = parameterItems; 53 template[Constants.ActivatedResults] = resultItems; 38 54 39 JArrayItems = new JArray(); 40 foreach (var item in JsonItems) { 41 if (item is ResultItem) 42 ResultItems.Add(Serialize(item)); 43 else 44 JArrayItems.Add(Serialize(item)); 45 } 46 Template[Constants.Parameters] = JArrayItems; 47 Template[Constants.ActivatedResults] = ResultItems; 48 // serialize template and return string 49 return SingleLineArrayJsonWriter.Serialize(Template); 55 // serialize template and write file 56 File.WriteAllText(fullPath + @"\" + templateName + ".json", SingleLineArrayJsonWriter.Serialize(template)); 50 57 } 51 58 52 public string GenerateTemplate(IEnumerable<IJsonItem> items) { 53 ProtoBufSerializer serializer = new ProtoBufSerializer(); 54 serializer.Serialize(Optimizer, @"C:\Workspace\template.hl"); 55 Template[Constants.Metadata][Constants.HLFileLocation] = @"C:\Workspace\template.hl"; 56 57 JArray ResultItems = new JArray(); 58 59 JArrayItems = new JArray(); 60 foreach (var item in items) { 61 if (item is ResultItem) 62 ResultItems.Add(Serialize(item)); 63 else 64 JArrayItems.Add(Serialize(item)); 65 } 66 Template[Constants.Parameters] = JArrayItems; 67 Template[Constants.ActivatedResults] = ResultItems; 68 69 // serialize template and return string 70 return SingleLineArrayJsonWriter.Serialize(Template); 71 } 72 73 public string GenerateTemplate(IJsonItem rootItem, IOptimizer optimizer) { 74 // data container 75 Template = JObject.Parse(Constants.Template); 76 JsonItems = new List<IJsonItem>(); 77 78 // extract JsonItem, save the name in the metadata section of the 79 // template and save it an JArray incl. all parameters of the JsonItem, 80 // which have parameters aswell 81 Template[Constants.Metadata][Constants.Optimizer] = optimizer.Name; 82 PopulateJsonItems(rootItem); 83 84 ProtoBufSerializer serializer = new ProtoBufSerializer(); 85 serializer.Serialize(Optimizer, @"C:\Workspace\template.hl"); 86 Template[Constants.Metadata][Constants.HLFileLocation] = @"C:\Workspace\template.hl"; 87 88 JArray ResultItems = new JArray(); 89 90 JArrayItems = new JArray(); 91 foreach (var item in JsonItems) { 92 if (item is ResultItem) 93 ResultItems.Add(Serialize(item)); 94 else 95 JArrayItems.Add(Serialize(item)); 96 } 97 Template[Constants.Parameters] = JArrayItems; 98 Template[Constants.ActivatedResults] = ResultItems; 99 100 // serialize template and return string 101 return SingleLineArrayJsonWriter.Serialize(Template); 102 } 103 104 public IEnumerable<IJsonItem> FetchJsonItems(IOptimizer optimizer) { 105 // data container 106 Template = JObject.Parse(Constants.Template); 107 JsonItems = new List<IJsonItem>(); 108 Optimizer = optimizer; 109 110 // extract JsonItem, save the name in the metadata section of the 111 // template and save it an JArray incl. all parameters of the JsonItem, 112 // which have parameters aswell 113 AddIItem(optimizer); 114 115 // serialize template and return string 116 return JsonItems; 117 } 118 119 #region Helper 120 121 private void AddIItem(IItem item) { 122 IJsonItem jsonItem = JsonItemConverter.Extract(item); 123 Template[Constants.Metadata][Constants.Optimizer] = item.ItemName; 124 PopulateJsonItems(jsonItem); 125 } 126 59 #region Helper 127 60 // serializes ParameterizedItems and saves them in list "JsonItems". 128 private void PopulateJsonItems(IJsonItem item ) {61 private void PopulateJsonItems(IJsonItem item, IList<IJsonItem> jsonItems) { 129 62 IEnumerable<IJsonItem> tmpParameter = item.Children; 130 63 131 64 if (item.Value != null || item.Range != null || item is ResultItem || item.ActualName != null) { 132 JsonItems.Add(item);65 jsonItems.Add(item); 133 66 } 134 67 135 68 if (tmpParameter != null) { 136 69 foreach (var p in tmpParameter) { 137 PopulateJsonItems(p );70 PopulateJsonItems(p, jsonItems); 138 71 } 139 72 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonTemplateInstantiator.cs
r17417 r17435 42 42 43 43 // extract metadata information 44 string optimizerName = instData.Template[Constants.Metadata][Constants. Optimizer].ToString();45 string hLFileLocation = instData.Template[Constants.Metadata][Constants.HLFileLocation].ToString();44 string optimizerName = instData.Template[Constants.Metadata][Constants.TemplateName].ToString(); 45 string hLFileLocation = Path.GetFullPath(instData.Template[Constants.Metadata][Constants.HLFileLocation].ToString()); 46 46 47 47 // deserialize hl file … … 72 72 73 73 private static void CollectParameterizedItems(InstData instData) { 74 //JCGenerator generator = new JCGenerator();75 //IEnumerable<IJsonItem> items = generator.FetchJsonItems(instData.Optimizer);76 74 IJsonItem root = JsonItemConverter.Extract(instData.Optimizer); 77 75 instData.Objects.Add(root.Path, root); … … 95 93 instData.Objects.Add(tmp.Path, tmp); 96 94 } 97 98 99 /*100 foreach (JObject item in instData.Template[Constants.Parameters]) {101 string[] pathParts = item.Property("Path").Value.ToString().Split('.');102 103 // rebuilds object tree104 IJsonItem parent = null;105 StringBuilder partialPath = new StringBuilder();106 for(int i = 0; i < pathParts.Length-1; ++i) {107 partialPath.Append(pathParts[i]);108 IJsonItem tmp = null;109 if (instData.Objects.TryGetValue(partialPath.ToString(), out IJsonItem value)) {110 tmp = value;111 } else {112 tmp = new JsonItem() { Name = pathParts[i] };113 if (parent != null) parent.AddChilds(tmp);114 instData.Objects.Add(partialPath.ToString(), tmp);115 }116 partialPath.Append(".");117 parent = tmp;118 }119 120 IJsonItem data = JsonItem.BuildJsonItem(item);121 parent.AddChilds(data);122 instData.Objects.Add(data.Path, data);123 }*/124 95 } 125 96 … … 127 98 foreach (JObject obj in instData.Config) { 128 99 // build item from config object 129 //IJsonItem item = JsonItem.BuildJsonItem(obj);130 100 string path = obj.Property("Path").Value.ToString(); 131 101 // override default value … … 138 108 } 139 109 } 140 141 private static IJsonItem GetData(string key, InstData instData)142 {143 if (instData.Objects.TryGetValue(key, out IJsonItem value))144 return value;145 else146 throw new InvalidDataException($"Type of item '{key}' is not defined!");147 }148 110 #endregion 149 111 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs
r17433 r17435 34 34 if (!res) faultyItems.Add(item); 35 35 Cache.Add(hash, res); 36 foreach (var child in item.Children) 37 res = res && ValidateHelper(child as JsonItem, ref faultyItems); 36 if(item.Children != null) 37 foreach (var child in item.Children) 38 res = res && ValidateHelper(child as JsonItem, ref faultyItems); 38 39 return res; 39 40 }
Note: See TracChangeset
for help on using the changeset viewer.