Follow suggested cleanup from VS

This commit is contained in:
Matt Nadareski
2020-10-07 16:11:05 -07:00
parent b7db9f7f14
commit f3031fe5f9
20 changed files with 152 additions and 126 deletions

View File

@@ -28,7 +28,7 @@ namespace RombaSharp
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private static Logger logger = new Logger(); private static readonly Logger logger = new Logger();
#endregion #endregion

View File

@@ -136,48 +136,48 @@ namespace SabreTools.Library.DatFiles
switch (itemKey) switch (itemKey)
{ {
case "name": case "name":
Header.Name = (Header.Name == null ? itemVal : Header.Name); Header.Name = Header.Name ?? itemVal;
superdat = superdat || itemVal.Contains(" - SuperDAT"); superdat = superdat || itemVal.Contains(" - SuperDAT");
if (keep && superdat) if (keep && superdat)
Header.Type = (Header.Type == null ? "SuperDAT" : Header.Type); Header.Type = Header.Type ?? "SuperDAT";
break; break;
case "description": case "description":
Header.Description = (Header.Description == null ? itemVal : Header.Description); Header.Description = Header.Description ?? itemVal;
break; break;
case "rootdir": case "rootdir":
Header.RootDir = (Header.RootDir == null ? itemVal : Header.RootDir); Header.RootDir = Header.RootDir ?? itemVal;
break; break;
case "category": case "category":
Header.Category = (Header.Category == null ? itemVal : Header.Category); Header.Category = Header.Category ?? itemVal;
break; break;
case "version": case "version":
Header.Version = (Header.Version == null ? itemVal : Header.Version); Header.Version = Header.Version ?? itemVal;
break; break;
case "date": case "date":
Header.Date = (Header.Date == null ? itemVal : Header.Date); Header.Date = Header.Date ?? itemVal;
break; break;
case "author": case "author":
Header.Author = (Header.Author == null ? itemVal : Header.Author); Header.Author = Header.Author ?? itemVal;
break; break;
case "email": case "email":
Header.Email = (Header.Email == null ? itemVal : Header.Email); Header.Email = Header.Email ?? itemVal;
break; break;
case "homepage": case "homepage":
Header.Homepage = (Header.Homepage == null ? itemVal : Header.Homepage); Header.Homepage = Header.Homepage ?? itemVal;
break; break;
case "url": case "url":
Header.Url = (Header.Url == null ? itemVal : Header.Url); Header.Url = Header.Url ?? itemVal;
break; break;
case "comment": case "comment":
Header.Comment = (Header.Comment == null ? itemVal : Header.Comment); Header.Comment = Header.Comment ?? itemVal;
break; break;
case "header": case "header":
Header.HeaderSkipper = (Header.HeaderSkipper == null ? itemVal : Header.HeaderSkipper); Header.HeaderSkipper = Header.HeaderSkipper ?? itemVal;
break; break;
case "type": case "type":
Header.Type = (Header.Type == null ? itemVal : Header.Type); Header.Type = Header.Type ?? itemVal;
superdat = superdat || itemVal.Contains("SuperDAT"); superdat = superdat || itemVal.Contains("SuperDAT");
break; break;
case "forcemerging": case "forcemerging":

View File

@@ -116,25 +116,25 @@ namespace SabreTools.Library.DatFiles
switch (itemKey) switch (itemKey)
{ {
case "name": case "name":
Header.Name = (Header.Name == null ? itemVal : Header.Name); Header.Name = Header.Name ?? itemVal;
break; break;
case "description": case "description":
Header.Description = (Header.Description == null ? itemVal : Header.Description); Header.Description = Header.Description ?? itemVal;
break; break;
case "dersion": case "dersion":
Header.Version = (Header.Version == null ? itemVal : Header.Version); Header.Version = Header.Version ?? itemVal;
break; break;
case "date": case "date":
Header.Date = (Header.Date == null ? itemVal : Header.Date); Header.Date = Header.Date ?? itemVal;
break; break;
case "author": case "author":
Header.Author = (Header.Author == null ? itemVal : Header.Author); Header.Author = Header.Author ?? itemVal;
break; break;
case "homepage": case "homepage":
Header.Homepage = (Header.Homepage == null ? itemVal : Header.Homepage); Header.Homepage = Header.Homepage ?? itemVal;
break; break;
case "comment": case "comment":
Header.Comment = (Header.Comment == null ? itemVal : Header.Comment); Header.Comment = Header.Comment ?? itemVal;
break; break;
} }
} }

View File

@@ -44,12 +44,12 @@ namespace SabreTools.Library.DatFiles
/// <summary> /// <summary>
/// Lock for statistics calculation /// Lock for statistics calculation
/// </summary> /// </summary>
private object statsLock = new object(); private readonly object statsLock = new object();
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private static Logger logger = new Logger(); private readonly static Logger logger = new Logger();
#endregion #endregion

View File

@@ -57,18 +57,18 @@ namespace SabreTools.Library.DatFiles
switch (xtr.Name) switch (xtr.Name)
{ {
case "mame": case "mame":
Header.Name = (Header.Name == null ? xtr.GetAttribute("build") : Header.Name); Header.Name = Header.Name ?? xtr.GetAttribute("build");
Header.Description = (Header.Description == null ? Header.Name : Header.Description); Header.Description = Header.Description ?? Header.Name;
Header.Debug = (Header.Debug == null ? xtr.GetAttribute("debug").AsYesNo() : Header.Debug); Header.Debug = Header.Debug ?? xtr.GetAttribute("debug").AsYesNo();
Header.MameConfig = (Header.MameConfig == null ? xtr.GetAttribute("mameconfig") : Header.MameConfig); Header.MameConfig = Header.MameConfig ?? xtr.GetAttribute("mameconfig");
xtr.Read(); xtr.Read();
break; break;
// Handle M1 DATs since they're 99% the same as a SL DAT // Handle M1 DATs since they're 99% the same as a SL DAT
case "m1": case "m1":
Header.Name = (Header.Name == null ? "M1" : Header.Name); Header.Name = Header.Name ?? "M1";
Header.Description = (Header.Description == null ? "M1" : Header.Description); Header.Description = Header.Description ?? "M1";
Header.Version = (Header.Version == null ? xtr.GetAttribute("version") ?? string.Empty : Header.Version); Header.Version = Header.Version ?? xtr.GetAttribute("version") ?? string.Empty;
xtr.Read(); xtr.Read();
break; break;
@@ -653,10 +653,12 @@ namespace SabreTools.Library.DatFiles
switch (reader.Name) switch (reader.Name)
{ {
case "slotoption": case "slotoption":
var slotOption = new SlotOption(); var slotOption = new SlotOption
slotOption.Name = reader.GetAttribute("name"); {
slotOption.DeviceName = reader.GetAttribute("devname"); Name = reader.GetAttribute("name"),
slotOption.Default = reader.GetAttribute("default").AsYesNo(); DeviceName = reader.GetAttribute("devname"),
Default = reader.GetAttribute("default").AsYesNo()
};
slot.SlotOptions.Add(slotOption); slot.SlotOptions.Add(slotOption);
@@ -760,11 +762,13 @@ namespace SabreTools.Library.DatFiles
switch (reader.Name) switch (reader.Name)
{ {
case "condition": case "condition":
var condition = new Condition(); var condition = new Condition
condition.Tag = reader.GetAttribute("tag"); {
condition.Mask = reader.GetAttribute("mask"); Tag = reader.GetAttribute("tag"),
condition.Relation = reader.GetAttribute("relation").AsRelation(); Mask = reader.GetAttribute("mask"),
condition.Value = reader.GetAttribute("value"); Relation = reader.GetAttribute("relation").AsRelation(),
Value = reader.GetAttribute("value")
};
dipSwitch.Conditions.Add(condition); dipSwitch.Conditions.Add(condition);
@@ -772,10 +776,12 @@ namespace SabreTools.Library.DatFiles
break; break;
case "diplocation": case "diplocation":
var dipLocation = new Location(); var dipLocation = new Location
dipLocation.Name = reader.GetAttribute("name"); {
dipLocation.Number = Sanitizer.CleanLong(reader.GetAttribute("number")); Name = reader.GetAttribute("name"),
dipLocation.Inverted = reader.GetAttribute("inverted").AsYesNo(); Number = Sanitizer.CleanLong(reader.GetAttribute("number")),
Inverted = reader.GetAttribute("inverted").AsYesNo()
};
dipSwitch.Locations.Add(dipLocation); dipSwitch.Locations.Add(dipLocation);
@@ -783,10 +789,12 @@ namespace SabreTools.Library.DatFiles
break; break;
case "dipvalue": case "dipvalue":
var dipValue = new Setting(); var dipValue = new Setting
dipValue.Name = reader.GetAttribute("name"); {
dipValue.Value = reader.GetAttribute("value"); Name = reader.GetAttribute("name"),
dipValue.Default = reader.GetAttribute("default").AsYesNo(); Value = reader.GetAttribute("value"),
Default = reader.GetAttribute("default").AsYesNo()
};
// Now read the internal tags // Now read the internal tags
ReadDipValue(reader, dipValue); ReadDipValue(reader, dipValue);
@@ -834,11 +842,13 @@ namespace SabreTools.Library.DatFiles
switch (reader.Name) switch (reader.Name)
{ {
case "condition": case "condition":
var condition = new Condition(); var condition = new Condition
condition.Tag = reader.GetAttribute("tag"); {
condition.Mask = reader.GetAttribute("mask"); Tag = reader.GetAttribute("tag"),
condition.Relation = reader.GetAttribute("relation").AsRelation(); Mask = reader.GetAttribute("mask"),
condition.Value = reader.GetAttribute("value"); Relation = reader.GetAttribute("relation").AsRelation(),
Value = reader.GetAttribute("value")
};
dipValue.Conditions.Add(condition); dipValue.Conditions.Add(condition);
@@ -884,11 +894,13 @@ namespace SabreTools.Library.DatFiles
switch (reader.Name) switch (reader.Name)
{ {
case "condition": case "condition":
var condition = new Condition(); var condition = new Condition
condition.Tag = reader.GetAttribute("tag"); {
condition.Mask = reader.GetAttribute("mask"); Tag = reader.GetAttribute("tag"),
condition.Relation = reader.GetAttribute("relation").AsRelation(); Mask = reader.GetAttribute("mask"),
condition.Value = reader.GetAttribute("value"); Relation = reader.GetAttribute("relation").AsRelation(),
Value = reader.GetAttribute("value")
};
configuration.Conditions.Add(condition); configuration.Conditions.Add(condition);
@@ -896,10 +908,12 @@ namespace SabreTools.Library.DatFiles
break; break;
case "conflocation": case "conflocation":
var confLocation = new Location(); var confLocation = new Location
confLocation.Name = reader.GetAttribute("name"); {
confLocation.Number = Sanitizer.CleanLong(reader.GetAttribute("number")); Name = reader.GetAttribute("name"),
confLocation.Inverted = reader.GetAttribute("inverted").AsYesNo(); Number = Sanitizer.CleanLong(reader.GetAttribute("number")),
Inverted = reader.GetAttribute("inverted").AsYesNo()
};
configuration.Locations.Add(confLocation); configuration.Locations.Add(confLocation);
@@ -907,10 +921,12 @@ namespace SabreTools.Library.DatFiles
break; break;
case "confsetting": case "confsetting":
var confSetting = new Setting(); var confSetting = new Setting
confSetting.Name = reader.GetAttribute("name"); {
confSetting.Value = reader.GetAttribute("value"); Name = reader.GetAttribute("name"),
confSetting.Default = reader.GetAttribute("default").AsYesNo(); Value = reader.GetAttribute("value"),
Default = reader.GetAttribute("default").AsYesNo()
};
// Now read the internal tags // Now read the internal tags
ReadConfSetting(reader, confSetting); ReadConfSetting(reader, confSetting);
@@ -958,11 +974,13 @@ namespace SabreTools.Library.DatFiles
switch (reader.Name) switch (reader.Name)
{ {
case "condition": case "condition":
var condition = new Condition(); var condition = new Condition
condition.Tag = reader.GetAttribute("tag"); {
condition.Mask = reader.GetAttribute("mask"); Tag = reader.GetAttribute("tag"),
condition.Relation = reader.GetAttribute("relation").AsRelation(); Mask = reader.GetAttribute("mask"),
condition.Value = reader.GetAttribute("value"); Relation = reader.GetAttribute("relation").AsRelation(),
Value = reader.GetAttribute("value")
};
confSetting.Conditions.Add(condition); confSetting.Conditions.Add(condition);
@@ -1006,8 +1024,10 @@ namespace SabreTools.Library.DatFiles
switch (reader.Name) switch (reader.Name)
{ {
case "analog": case "analog":
var analog = new Analog(); var analog = new Analog
analog.Mask = reader.GetAttribute("mask"); {
Mask = reader.GetAttribute("mask")
};
port.Analogs.Add(analog); port.Analogs.Add(analog);
@@ -1051,11 +1071,13 @@ namespace SabreTools.Library.DatFiles
switch (reader.Name) switch (reader.Name)
{ {
case "condition": case "condition":
var condition = new Condition(); var condition = new Condition
condition.Tag = reader.GetAttribute("tag"); {
condition.Mask = reader.GetAttribute("mask"); Tag = reader.GetAttribute("tag"),
condition.Relation = reader.GetAttribute("relation").AsRelation(); Mask = reader.GetAttribute("mask"),
condition.Value = reader.GetAttribute("value"); Relation = reader.GetAttribute("relation").AsRelation(),
Value = reader.GetAttribute("value")
};
adjuster.Conditions.Add(condition); adjuster.Conditions.Add(condition);

View File

@@ -150,68 +150,68 @@ namespace SabreTools.Library.DatFiles
switch (reader.Name) switch (reader.Name)
{ {
case "name": case "name":
content = reader.ReadElementContentAsString(); ; content = reader.ReadElementContentAsString();
Header.Name = (Header.Name == null ? content : Header.Name); Header.Name = Header.Name ?? content;
superdat = superdat || content.Contains(" - SuperDAT"); superdat = superdat || content.Contains(" - SuperDAT");
if (keep && superdat) if (keep && superdat)
{ {
Header.Type = (Header.Type == null ? "SuperDAT" : Header.Type); Header.Type = Header.Type ?? "SuperDAT";
} }
break; break;
case "description": case "description":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Description = (Header.Description == null ? content : Header.Description); Header.Description = Header.Description ?? content;
break; break;
case "rootdir": // This is exclusive to TruRip XML case "rootdir": // This is exclusive to TruRip XML
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.RootDir = (Header.RootDir == null ? content : Header.RootDir); Header.RootDir = Header.RootDir ?? content;
break; break;
case "category": case "category":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Category = (Header.Category == null ? content : Header.Category); Header.Category = Header.Category ?? content;
break; break;
case "version": case "version":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Version = (Header.Version == null ? content : Header.Version); Header.Version = Header.Version ?? content;
break; break;
case "date": case "date":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Date = (Header.Date == null ? content.Replace(".", "/") : Header.Date); Header.Date = Header.Date ?? content.Replace(".", "/");
break; break;
case "author": case "author":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Author = (Header.Author == null ? content : Header.Author); Header.Author = Header.Author ?? content;
break; break;
case "email": case "email":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Email = (Header.Email == null ? content : Header.Email); Header.Email = Header.Email ?? content;
break; break;
case "homepage": case "homepage":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Homepage = (Header.Homepage == null ? content : Header.Homepage); Header.Homepage = Header.Homepage ?? content;
break; break;
case "url": case "url":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Url = (Header.Url == null ? content : Header.Url); Header.Url = Header.Url ?? content;
break; break;
case "comment": case "comment":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Comment = (Header.Comment == null ? content : Header.Comment); Header.Comment = (Header.Comment ?? content);
break; break;
case "type": // This is exclusive to TruRip XML case "type": // This is exclusive to TruRip XML
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Type = (Header.Type == null ? content : Header.Type); Header.Type = Header.Type ?? content;
superdat = superdat || content.Contains("SuperDAT"); superdat = superdat || content.Contains("SuperDAT");
break; break;

View File

@@ -122,34 +122,34 @@ namespace SabreTools.Library.DatFiles
{ {
case "datname": case "datname":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Name = (Header.Name == null ? content : Header.Name); Header.Name = Header.Name ?? content;
superdat = superdat || content.Contains(" - SuperDAT"); superdat = superdat || content.Contains(" - SuperDAT");
if (keep && superdat) if (keep && superdat)
{ {
Header.Type = (Header.Type == null ? "SuperDAT" : Header.Type); Header.Type = Header.Type ?? "SuperDAT";
} }
break; break;
case "datversion": case "datversion":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.Version = (Header.Version == null ? content : Header.Version); Header.Version = Header.Version ?? content;
break; break;
case "system": case "system":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.System = (Header.System == null ? content : Header.System); Header.System = Header.System ?? content;
break; break;
// TODO: Int32? // TODO: Int32?
case "screenshotswidth": case "screenshotswidth":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.ScreenshotsWidth = (Header.ScreenshotsWidth == null ? content : Header.ScreenshotsWidth); Header.ScreenshotsWidth = Header.ScreenshotsWidth ?? content;
break; break;
// TODO: Int32? // TODO: Int32?
case "screenshotsheight": case "screenshotsheight":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.ScreenshotsHeight = (Header.ScreenshotsHeight == null ? content : Header.ScreenshotsHeight); Header.ScreenshotsHeight = Header.ScreenshotsHeight ?? content;
break; break;
case "infos": case "infos":
@@ -184,7 +184,7 @@ namespace SabreTools.Library.DatFiles
case "romtitle": case "romtitle":
content = reader.ReadElementContentAsString(); content = reader.ReadElementContentAsString();
Header.RomTitle = (Header.RomTitle == null ? content : Header.RomTitle); Header.RomTitle = Header.RomTitle ?? content;
break; break;
default: default:
@@ -224,11 +224,13 @@ namespace SabreTools.Library.DatFiles
switch (reader.Name.ToLowerInvariant()) switch (reader.Name.ToLowerInvariant())
{ {
case "info": case "info":
var info = new OfflineListInfo(); var info = new OfflineListInfo
info.Name = reader.Name.ToLowerInvariant(); {
info.Visible = reader.GetAttribute("visible").AsYesNo(); Name = reader.Name.ToLowerInvariant(),
info.InNamingOption = reader.GetAttribute("inNamingOption").AsYesNo(); Visible = reader.GetAttribute("visible").AsYesNo(),
info.Default = reader.GetAttribute("default").AsYesNo(); InNamingOption = reader.GetAttribute("inNamingOption").AsYesNo(),
Default = reader.GetAttribute("default").AsYesNo()
};
Header.Infos.Add(info); Header.Infos.Add(info);

View File

@@ -56,9 +56,9 @@ namespace SabreTools.Library.DatFiles
switch (xtr.Name) switch (xtr.Name)
{ {
case "softwaredb": case "softwaredb":
Header.Name = (Header.Name == null ? "openMSX Software List" : Header.Name); Header.Name = Header.Name ?? "openMSX Software List";
Header.Description = (Header.Description == null ? Header.Name : Header.Description); Header.Description = Header.Description ?? Header.Name;
Header.Date = (Header.Date == null ? xtr.GetAttribute("timestamp") : Header.Date); Header.Date = Header.Date ?? xtr.GetAttribute("timestamp");
xtr.Read(); xtr.Read();
break; break;
@@ -242,9 +242,11 @@ namespace SabreTools.Library.DatFiles
break; break;
case "original": case "original":
original = new Original(); original = new Original
original.Value = reader.GetAttribute("value").AsYesNo(); {
original.Content = reader.ReadElementContentAsString(); Value = reader.GetAttribute("value").AsYesNo(),
Content = reader.ReadElementContentAsString()
};
break; break;
default: default:

View File

@@ -203,12 +203,12 @@ namespace SabreTools.Library.DatFiles
switch (kvp?.Key.ToLowerInvariant()) switch (kvp?.Key.ToLowerInvariant())
{ {
case "version": case "version":
Header.RomCenterVersion = Header.RomCenterVersion ?? (kvp?.Value); Header.RomCenterVersion = Header.RomCenterVersion ?? kvp?.Value;
reader.ReadNextLine(); reader.ReadNextLine();
break; break;
case "plugin": case "plugin":
Header.System = (Header.System == null ? kvp?.Value : Header.System); Header.System = Header.System ?? kvp?.Value;
reader.ReadNextLine(); reader.ReadNextLine();
break; break;
@@ -267,12 +267,12 @@ namespace SabreTools.Library.DatFiles
switch (kvp?.Key.ToLowerInvariant()) switch (kvp?.Key.ToLowerInvariant())
{ {
case "refname": case "refname":
Header.Name = Header.Name == null ? kvp?.Value : Header.Name; Header.Name = Header.Name ?? kvp?.Value;
reader.ReadNextLine(); reader.ReadNextLine();
break; break;
case "version": case "version":
Header.Description = Header.Description == null ? kvp?.Value : Header.Description; Header.Description = Header.Description ?? kvp?.Value;
reader.ReadNextLine(); reader.ReadNextLine();
break; break;

View File

@@ -58,8 +58,8 @@ namespace SabreTools.Library.DatFiles
switch (xtr.Name) switch (xtr.Name)
{ {
case "softwarelist": case "softwarelist":
Header.Name = (Header.Name == null ? xtr.GetAttribute("name") ?? string.Empty : Header.Name); Header.Name = Header.Name ?? xtr.GetAttribute("name") ?? string.Empty;
Header.Description = (Header.Description == null ? xtr.GetAttribute("description") ?? string.Empty : Header.Description); Header.Description = Header.Description ?? xtr.GetAttribute("description") ?? string.Empty;
xtr.Read(); xtr.Read();
break; break;

View File

@@ -21,7 +21,7 @@ namespace SabreTools.Library.Filtering
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private Logger logger = new Logger(); private readonly Logger logger = new Logger();
#endregion #endregion

View File

@@ -291,7 +291,7 @@ namespace SabreTools.Library.Filtering
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private Logger logger = new Logger(); private readonly Logger logger = new Logger();
#endregion #endregion

View File

@@ -18,7 +18,7 @@ namespace SabreTools.Library.Help
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private Logger logger = new Logger(); private readonly Logger logger = new Logger();
#endregion #endregion

View File

@@ -23,7 +23,7 @@ namespace SabreTools.Library.IO
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private static Logger logger = new Logger(); private static readonly Logger logger = new Logger();
#endregion #endregion

View File

@@ -11,7 +11,7 @@ namespace SabreTools.Library.Logging
/// Instance associated with this logger /// Instance associated with this logger
/// </summary> /// </summary>
/// TODO: Derive class name for this object, if possible /// TODO: Derive class name for this object, if possible
private object instance; private readonly object instance;
/// <summary> /// <summary>
/// Constructor /// Constructor

View File

@@ -43,7 +43,7 @@ namespace SabreTools.Library.Skippers
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private Logger logger = new Logger(); private readonly Logger logger = new Logger();
#endregion #endregion

View File

@@ -37,7 +37,7 @@ namespace SabreTools.Library.Skippers
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private static Logger logger = new Logger(); private static readonly Logger logger = new Logger();
#endregion #endregion

View File

@@ -18,7 +18,7 @@ namespace SabreTools.Library.Tools
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private static Logger logger = new Logger(); private static readonly Logger logger = new Logger();
#endregion #endregion

View File

@@ -11,7 +11,7 @@ namespace SabreTools.Library.Tools
{ {
private string _subject; private string _subject;
private DateTime _startTime; private DateTime _startTime;
private Logger _logger = new Logger(); private readonly Logger _logger = new Logger();
/// <summary> /// <summary>
/// Constructor that initalizes the stopwatch /// Constructor that initalizes the stopwatch

View File

@@ -20,7 +20,7 @@ namespace SabreTools
/// <summary> /// <summary>
/// Logging object /// Logging object
/// </summary> /// </summary>
private static Logger logger = new Logger(); private static readonly Logger logger = new Logger();
#endregion #endregion