Modernization Fixes & Updates to Default Values (#3)

This commit is contained in:
Kamron Batman 2018-10-28 00:33:16 -07:00 • committed by GitHub
parent 445eddff68
commit dcf64091b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
768 changed files with 10507 additions and 14196 deletions

View file

@ -1,13 +1,3 @@
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.573
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
using System;
using System.Collections;

View file

@ -1,5 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
namespace Server.Engines.Reports
{
@ -7,11 +8,11 @@ namespace Server.Engines.Reports
public sealed class PersistableTypeRegistry
{
private static Hashtable m_Table;
private static Dictionary<string, PersistableType> m_Table;
static PersistableTypeRegistry()
{
m_Table = new Hashtable(StringComparer.OrdinalIgnoreCase);
m_Table = new Dictionary<string, PersistableType>(StringComparer.OrdinalIgnoreCase);
Register(Report.ThisTypeID);
Register(BarGraph.ThisTypeID);
@ -31,7 +32,7 @@ namespace Server.Engines.Reports
public static PersistableType Find(string name)
{
return m_Table[name] as PersistableType;
return m_Table[name];
}
public static void Register(PersistableType type)
@ -53,4 +54,4 @@ namespace Server.Engines.Reports
public ConstructCallback Constructor{ get; }
}
}
}

View file

@ -41,12 +41,12 @@ namespace Server.Engines.Reports
public override int GetInt32(string key)
{
return XmlConvert.ToInt32(m_Xml.GetAttribute(key));
return XmlConvert.ToInt32(m_Xml.GetAttribute(key) ?? "");
}
public override bool GetBoolean(string key)
{
return XmlConvert.ToBoolean(m_Xml.GetAttribute(key));
return XmlConvert.ToBoolean(m_Xml.GetAttribute(key) ?? "");
}
public override string GetString(string key)

View file

@ -102,7 +102,7 @@ namespace Server.Engines.Reports
try
{
string renamed = null;
string renamed;
if (File.Exists(m_RealFilePath))
{