Changeset 17315 for branches/2521_ProblemRefactoring/HeuristicLab.Data/3.3
- Timestamp:
- 10/04/19 14:23:08 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Data/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Data/3.3/BoolArray.cs
r17309 r17315 20 20 #endregion 21 21 22 using System.Collections.Generic;23 22 using System.Text; 24 23 using HEAL.Attic; … … 38 37 public BoolArray(int length) : base(length) { } 39 38 public BoolArray(bool[] elements, bool @readonly = false) : base(elements, @readonly) { } 40 public BoolArray(IReadOnlyList<bool> elements) : base(elements) { }41 39 42 40 public override IDeepCloneable Clone(Cloner cloner) { -
branches/2521_ProblemRefactoring/HeuristicLab.Data/3.3/StringConvertibleArray.cs
r17309 r17315 22 22 #endregion 23 23 24 using System.Collections.Generic;25 24 using HEAL.Attic; 26 25 using HeuristicLab.Common; … … 39 38 protected StringConvertibleArray(int length) : base(length) { } 40 39 protected StringConvertibleArray(T[] elements, bool @readonly = false) : base(elements, @readonly) { } 41 protected StringConvertibleArray(IReadOnlyList<T> elements) : base(elements) { }42 40 43 41 protected abstract bool Validate(string value, out string errorMessage); -
branches/2521_ProblemRefactoring/HeuristicLab.Data/3.3/ValueTypeArray.cs
r17309 r17315 138 138 } 139 139 protected ValueTypeArray(T[] elements, bool @readonly = false) { 140 if (elements == null) throw new ArgumentNullException( nameof(elements));140 if (elements == null) throw new ArgumentNullException(); 141 141 array = (T[])elements.Clone(); 142 142 readOnly = @readonly; 143 143 resizable = true; 144 144 elementNames = new List<string>(); 145 }146 147 protected ValueTypeArray(IReadOnlyList<T> elements) {148 if (elements == null) throw new ArgumentNullException(nameof(elements));149 array = elements.ToArray(); // TODO: array should be an IList<T>150 readOnly = true;151 resizable = true; // TODO: really?152 elementNames = new List<string>(); // TODO: wasteful153 145 } 154 146
Note: See TracChangeset
for help on using the changeset viewer.