Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/08/09 11:03:36 (15 years ago)
Author:
epitzer
Message:

Add Priority property to IDecomposer interface to allow specialized decomposers to be tried first. (#578)

File:
1 edited

Legend:

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

    r1473 r1539  
    8484        if ( a != defaultAssembly )
    8585          DiscoverFrom(a);
     86      SortDecomposers();
     87    }
     88
     89    class PriortiySorter : IComparer<IDecomposer> {
     90      public int Compare(IDecomposer x, IDecomposer y) {
     91        return y.Priority - x.Priority;
     92      }
     93    }
     94
     95    protected void SortDecomposers() {
     96      Decomposers.Sort(new PriortiySorter());
    8697    }
    8798
Note: See TracChangeset for help on using the changeset viewer.