Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/10/10 03:39:02 (15 years ago)
Author:
swagner
Message:

Operator architecture refactoring (#95)

  • worked on parameters and operators
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/ExecutionContextCollection.cs

    r2757 r2773  
    2828
    2929namespace HeuristicLab.Core {
    30   public class ExecutionContextCollection : DeepCloneable, IList<IExecutionContext>, IExecutionContext {
     30  public class ExecutionContextCollection : DeepCloneable, IList<IExecutionSequence>, IExecutionSequence {
    3131    [Storable]
    32     private IList<IExecutionContext> contexts;
     32    private IList<IExecutionSequence> contexts;
    3333
    3434    [Storable]
     
    4040
    4141    public ExecutionContextCollection() {
    42       contexts = new List<IExecutionContext>();
     42      contexts = new List<IExecutionSequence>();
    4343      parallel = false;
    4444    }
    45     public ExecutionContextCollection(IEnumerable<IExecutionContext> collection) {
    46       contexts = new List<IExecutionContext>(collection.Where(e => e != null));
     45    public ExecutionContextCollection(IEnumerable<IExecutionSequence> collection) {
     46      contexts = new List<IExecutionSequence>(collection.Where(e => e != null));
    4747      parallel = false;
    4848    }
    49     public ExecutionContextCollection(params IExecutionContext[] list) {
    50       contexts = new List<IExecutionContext>(list.Where(e => e != null));
     49    public ExecutionContextCollection(params IExecutionSequence[] list) {
     50      contexts = new List<IExecutionSequence>(list.Where(e => e != null));
    5151      parallel = false;
    5252    }
     
    5757      clone.parallel = parallel;
    5858      for (int i = 0; i < contexts.Count; i++)
    59         clone.contexts.Add((IExecutionContext)cloner.Clone(contexts[i]));
     59        clone.contexts.Add((IExecutionSequence)cloner.Clone(contexts[i]));
    6060      return clone;
    6161    }
    6262
    6363    #region IList<IExecutionContext> Members
    64     public int IndexOf(IExecutionContext item) {
     64    public int IndexOf(IExecutionSequence item) {
    6565      return contexts.IndexOf(item);
    6666    }
    67     public void Insert(int index, IExecutionContext item) {
     67    public void Insert(int index, IExecutionSequence item) {
    6868      if (item != null) contexts.Insert(index, item);
    6969    }
     
    7171      contexts.RemoveAt(index);
    7272    }
    73     public IExecutionContext this[int index] {
     73    public IExecutionSequence this[int index] {
    7474      get { return contexts[index]; }
    7575      set { if (value != null) contexts[index] = value; }
     
    7878
    7979    #region ICollection<IExecutionContext> Members
    80     public void Add(IExecutionContext item) {
     80    public void Add(IExecutionSequence item) {
    8181      if (item != null) contexts.Add(item);
    8282    }
     
    8484      contexts.Clear();
    8585    }
    86     public bool Contains(IExecutionContext item) {
     86    public bool Contains(IExecutionSequence item) {
    8787      return contexts.Contains(item);
    8888    }
    89     public void CopyTo(IExecutionContext[] array, int arrayIndex) {
     89    public void CopyTo(IExecutionSequence[] array, int arrayIndex) {
    9090      contexts.CopyTo(array, arrayIndex);
    9191    }
     
    9696      get { return contexts.IsReadOnly; }
    9797    }
    98     public bool Remove(IExecutionContext item) {
     98    public bool Remove(IExecutionSequence item) {
    9999      return contexts.Remove(item);
    100100    }
     
    102102
    103103    #region IEnumerable<IExecutionContext> Members
    104     public IEnumerator<IExecutionContext> GetEnumerator() {
     104    public IEnumerator<IExecutionSequence> GetEnumerator() {
    105105      return contexts.GetEnumerator();
    106106    }
Note: See TracChangeset for help on using the changeset viewer.