Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/11/17 17:46:11 (6 years ago)
Author:
jkarder
Message:

#2520: worked on new persistence

  • changed message definitions
  • updated transformers
  • cleaned up
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistenceReintegration/HeuristicLab.Persistence/4.0/Core/Index.cs

    r14549 r15509  
    2626  [NonDiscoverableType]
    2727  internal sealed class Index<T> where T : class {
    28     private Dictionary<T, uint> indexes;
    29     private Dictionary<uint, T> values;
     28    private readonly Dictionary<T, uint> indexes;
     29    private readonly Dictionary<uint, T> values;
    3030    private uint nextIndex;
    3131
     
    3535      nextIndex = 1;
    3636    }
    37     public Index(IEnumerable<T> values)
    38       : this() {
     37
     38    public Index(IEnumerable<T> values) : this() {
    3939      foreach (var value in values) {
    4040        this.indexes.Add(value, nextIndex);
     
    5454      return index;
    5555    }
     56
    5657    public T GetValue(uint index) {
    5758      return index == 0 ? null : values[index];
    5859    }
     60
    5961    public IEnumerable<T> GetValues() {
    6062      return values.Values;
Note: See TracChangeset for help on using the changeset viewer.