- Timestamp:
- 04/18/12 20:01:42 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OKB (trunk integration)/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBRun.cs
r7634 r7741 190 190 List<Value> ConvertToValues(IDictionary<string, IItem> items) { 191 191 List<Value> values = new List<Value>(); 192 bool add = true; 192 193 foreach (var item in items) { 193 194 Value value; … … 208 209 v.Value = ((Data.PercentValue)item.Value).Value; 209 210 value = v; 211 if (double.IsNaN(v.Value)) { 212 add = false; 213 } 210 214 } else if (item.Value is Data.DoubleValue) { 211 215 DoubleValue v = new DoubleValue(); 212 216 v.Value = ((Data.DoubleValue)item.Value).Value; 213 217 value = v; 218 if (double.IsNaN(v.Value)) { 219 add = false; 220 } 214 221 } else if (item.Value is Data.StringValue) { 215 222 StringValue v = new StringValue(); … … 225 232 value = v; 226 233 } 227 value.Name = item.Key; 228 value.DataType = new DataType(); 229 value.DataType.Name = item.Value.GetType().Name; 230 value.DataType.TypeName = item.Value.GetType().AssemblyQualifiedName; 231 values.Add(value); 234 if (add) { 235 value.Name = item.Key; 236 value.DataType = new DataType(); 237 value.DataType.Name = item.Value.GetType().Name; 238 value.DataType.TypeName = item.Value.GetType().AssemblyQualifiedName; 239 values.Add(value); 240 } else { 241 add = true; 242 } 232 243 } 233 244 return values;
Note: See TracChangeset
for help on using the changeset viewer.