Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/17/11 10:55:02 (13 years ago)
Author:
epitzer
Message:

Small fixes (typos, static analysis suggestions) (#1530)

Location:
branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Auxiliary/TypeLoader.cs

    r5445 r6210  
    2727namespace HeuristicLab.Persistence.Auxiliary {
    2828
    29   internal class TypeLoader {
     29  internal static class TypeLoader {
    3030
    3131    public static Type Load(string typeNameString) {
     
    3333      try {
    3434        type = Type.GetType(typeNameString, true);
    35       }
    36       catch (Exception) {
     35      } catch (Exception) {
    3736        Logger.Warn(String.Format(
    3837          "Cannot load type \"{0}\", falling back to partial name", typeNameString));
     
    4443#pragma warning restore 0618
    4544          type = a.GetType(typeName.ToString(false, false), true);
    46         }
    47         catch (Exception) {
     45        } catch (Exception) {
    4846          throw new PersistenceException(String.Format(
    4947            "Could not load type \"{0}\"",
     
    6361              typeNameString,
    6462              type.AssemblyQualifiedName));
    65         }
    66         catch (PersistenceException) {
     63        } catch (PersistenceException) {
    6764          throw;
    68         }
    69         catch (Exception e) {
     65        } catch (Exception e) {
    7066          Logger.Warn(String.Format(
    7167            "Could not perform version check requested type was {0} while loaded type is {1}:",
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Auxiliary/TypeName.cs

    r5445 r6210  
    8484    /// <value>The assembly attribues.</value>
    8585    [Storable]
    86     public Dictionary<string, string> AssemblyAttribues { get; internal set; }
     86    public Dictionary<string, string> AssemblyAttributes { get; internal set; }
    8787
    8888    /// <summary>
     
    108108      GenericArgs = new List<TypeName>();
    109109      MemoryMagic = "";
    110       AssemblyAttribues = new Dictionary<string, string>();
     110      AssemblyAttributes = new Dictionary<string, string>();
    111111    }
    112112
     
    155155        sb.Append(", ").Append(AssemblyName);
    156156        if (full)
    157           foreach (var property in AssemblyAttribues)
     157          foreach (var property in AssemblyAttributes)
    158158            sb.Append(", ").Append(property.Key).Append('=').Append(property.Value);
    159159      }
     
    224224          throw new Exception("Cannot compare versions of different types");
    225225        if (CompareVersions(
    226           this.AssemblyAttribues["Version"],
    227           typeName.AssemblyAttribues["Version"]) > 0)
     226          this.AssemblyAttributes["Version"],
     227          typeName.AssemblyAttributes["Version"]) > 0)
    228228          return true;
    229229        IEnumerator<TypeName> thisIt = this.GenericArgs.GetEnumerator();
     
    255255          this.AssemblyName != typeName.AssemblyName)
    256256          throw new Exception("Cannot compare versions of different types");
    257         Version thisVersion = new Version(this.AssemblyAttribues["Version"]);
    258         Version tVersion = new Version(typeName.AssemblyAttribues["Version"]);
     257        Version thisVersion = new Version(this.AssemblyAttributes["Version"]);
     258        Version tVersion = new Version(typeName.AssemblyAttributes["Version"]);
    259259        if (this.AssemblyName == "mscorlib" &&
    260260          (thisVersion.Major == 2 || thisVersion.Major == 4) &&
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Auxiliary/TypeNameParser.cs

    r5445 r6210  
    246246          KeyValuePair<string, string> property =
    247247            TransformAssemblyProperty();
    248           typeName.AssemblyAttribues.Add(property.Key, property.Value);
     248          typeName.AssemblyAttributes.Add(property.Key, property.Value);
    249249        }
    250250      }
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/HashSetSerializer.cs

    r5445 r6210  
    7373      }
    7474    }
    75 
    76     public object HashSet { get; set; }
    7775  }
    7876}
  • branches/PersistenceSpeedUp/HeuristicLab.Persistence/3.3/Tests/UseCases.cs

    r5698 r6210  
    863863        Assert.Fail("Exception expected");
    864864      } catch (PersistenceException pe) {
    865         Assert.AreEqual(pe.InnerException.Message, "this constructor will always fail");
     865        Assert.AreEqual("this constructor will always fail", pe.InnerException.Message);
    866866      }
    867867    }
Note: See TracChangeset for help on using the changeset viewer.