Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/08/09 17:05:17 (15 years ago)
Author:
epitzer
Message:

Numerous small changes, coding conventions, renames, mini refactoring (#548)

File:
1 edited

Legend:

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

    r1539 r1542  
    77using HeuristicLab.Persistence.Interfaces;
    88using HeuristicLab.Tracing;
     9using HeuristicLab.Persistence.Interfaces.Tokens;
    910
    1011namespace HeuristicLab.Persistence.Core {
     
    1415    private static ConfigurationService instance;
    1516    private readonly Dictionary<IFormat, Configuration> customConfigurations;
    16     public readonly Dictionary<IFormat, List<IFormatter>> Formatters;
    17     public readonly List<IDecomposer> Decomposers;
     17    public Dictionary<IFormat, List<IFormatter>> Formatters { get; private set; }
     18    public List<IDecomposer> Decomposers { get; private set; }
    1819   
    1920    public static ConfigurationService Instance {
     
    2526    }
    2627
    27     public ConfigurationService() {
     28    private ConfigurationService() {
    2829      Formatters = new Dictionary<IFormat, List<IFormatter>>();
    2930      Decomposers = new List<IDecomposer>();
     
    3536    public void LoadSettings() {
    3637      try {
    37         if (String.IsNullOrEmpty(Properties.Settings.Default.customConfigurations) ||
    38           String.IsNullOrEmpty(Properties.Settings.Default.customConfigurationsTypeCache))
     38        if (String.IsNullOrEmpty(Properties.Settings.Default.CustomConfigurations) ||
     39          String.IsNullOrEmpty(Properties.Settings.Default.CustomConfigurationsTypeCache))
    3940          return;
    40         DeSerializer deSerializer = new DeSerializer(
     41        Deserializer deSerializer = new Deserializer(
    4142          XmlParser.ParseTypeCache(
    4243          new StringReader(
    43             Properties.Settings.Default.customConfigurationsTypeCache)));
     44            Properties.Settings.Default.CustomConfigurationsTypeCache)));
    4445        XmlParser parser = new XmlParser(
    4546          new StringReader(
    46             Properties.Settings.Default.customConfigurations));
     47            Properties.Settings.Default.CustomConfigurations));
    4748        var newCustomConfigurations = (Dictionary<IFormat, Configuration>)
    48           deSerializer.DeSerialize(parser);
     49          deSerializer.Deserialize(parser);
    4950        foreach (var config in newCustomConfigurations) {
    5051          customConfigurations[config.Key] = config.Value;
     
    6869      foreach (string s in generator.Format(serializer.TypeCache))
    6970        configurationTypeCacheString.Append(s);
    70       Properties.Settings.Default.customConfigurations =
     71      Properties.Settings.Default.CustomConfigurations =
    7172        configurationString.ToString();
    72       Properties.Settings.Default.customConfigurationsTypeCache =
     73      Properties.Settings.Default.CustomConfigurationsTypeCache =
    7374        configurationTypeCacheString.ToString();
    7475      Properties.Settings.Default.Save();
Note: See TracChangeset for help on using the changeset viewer.