- Timestamp:
- 02/10/10 03:39:02 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/ExecutionContextCollection.cs
r2757 r2773 28 28 29 29 namespace HeuristicLab.Core { 30 public class ExecutionContextCollection : DeepCloneable, IList<IExecution Context>, IExecutionContext{30 public class ExecutionContextCollection : DeepCloneable, IList<IExecutionSequence>, IExecutionSequence { 31 31 [Storable] 32 private IList<IExecution Context> contexts;32 private IList<IExecutionSequence> contexts; 33 33 34 34 [Storable] … … 40 40 41 41 public ExecutionContextCollection() { 42 contexts = new List<IExecution Context>();42 contexts = new List<IExecutionSequence>(); 43 43 parallel = false; 44 44 } 45 public ExecutionContextCollection(IEnumerable<IExecution Context> collection) {46 contexts = new List<IExecution Context>(collection.Where(e => e != null));45 public ExecutionContextCollection(IEnumerable<IExecutionSequence> collection) { 46 contexts = new List<IExecutionSequence>(collection.Where(e => e != null)); 47 47 parallel = false; 48 48 } 49 public ExecutionContextCollection(params IExecution Context[] list) {50 contexts = new List<IExecution Context>(list.Where(e => e != null));49 public ExecutionContextCollection(params IExecutionSequence[] list) { 50 contexts = new List<IExecutionSequence>(list.Where(e => e != null)); 51 51 parallel = false; 52 52 } … … 57 57 clone.parallel = parallel; 58 58 for (int i = 0; i < contexts.Count; i++) 59 clone.contexts.Add((IExecution Context)cloner.Clone(contexts[i]));59 clone.contexts.Add((IExecutionSequence)cloner.Clone(contexts[i])); 60 60 return clone; 61 61 } 62 62 63 63 #region IList<IExecutionContext> Members 64 public int IndexOf(IExecution Contextitem) {64 public int IndexOf(IExecutionSequence item) { 65 65 return contexts.IndexOf(item); 66 66 } 67 public void Insert(int index, IExecution Contextitem) {67 public void Insert(int index, IExecutionSequence item) { 68 68 if (item != null) contexts.Insert(index, item); 69 69 } … … 71 71 contexts.RemoveAt(index); 72 72 } 73 public IExecution Contextthis[int index] {73 public IExecutionSequence this[int index] { 74 74 get { return contexts[index]; } 75 75 set { if (value != null) contexts[index] = value; } … … 78 78 79 79 #region ICollection<IExecutionContext> Members 80 public void Add(IExecution Contextitem) {80 public void Add(IExecutionSequence item) { 81 81 if (item != null) contexts.Add(item); 82 82 } … … 84 84 contexts.Clear(); 85 85 } 86 public bool Contains(IExecution Contextitem) {86 public bool Contains(IExecutionSequence item) { 87 87 return contexts.Contains(item); 88 88 } 89 public void CopyTo(IExecution Context[] array, int arrayIndex) {89 public void CopyTo(IExecutionSequence[] array, int arrayIndex) { 90 90 contexts.CopyTo(array, arrayIndex); 91 91 } … … 96 96 get { return contexts.IsReadOnly; } 97 97 } 98 public bool Remove(IExecution Contextitem) {98 public bool Remove(IExecutionSequence item) { 99 99 return contexts.Remove(item); 100 100 } … … 102 102 103 103 #region IEnumerable<IExecutionContext> Members 104 public IEnumerator<IExecution Context> GetEnumerator() {104 public IEnumerator<IExecutionSequence> GetEnumerator() { 105 105 return contexts.GetEnumerator(); 106 106 }
Note: See TracChangeset
for help on using the changeset viewer.