Fix ambiguous references

This commit is contained in:
Matt Nadareski
2023-04-17 13:22:35 -04:00
parent 5fce4c84b5
commit 18fee399f4
19 changed files with 35 additions and 35 deletions

View File

@@ -465,8 +465,8 @@ Possible values are: Verbose, User, Warning, Error");
public void EnsureDatabase(string db, string connectionString) public void EnsureDatabase(string db, string connectionString)
{ {
// Make sure the file exists // Make sure the file exists
if (!File.Exists(db)) if (!System.IO.File.Exists(db))
File.Create(db); System.IO.File.Create(db);
// Open the database connection // Open the database connection
SqliteConnection dbc = new SqliteConnection(connectionString); SqliteConnection dbc = new SqliteConnection(connectionString);
@@ -734,16 +734,16 @@ CREATE TABLE IF NOT EXISTS dat (
if (!Directory.Exists(key)) if (!Directory.Exists(key))
{ {
Directory.CreateDirectory(key); Directory.CreateDirectory(key);
File.CreateText(Path.Combine(key, ".romba_size")); System.IO.File.CreateText(Path.Combine(key, ".romba_size"));
File.CreateText(Path.Combine(key, ".romba_size.backup")); System.IO.File.CreateText(Path.Combine(key, ".romba_size.backup"));
} }
else else
{ {
if (!File.Exists(Path.Combine(key, ".romba_size"))) if (!System.IO.File.Exists(Path.Combine(key, ".romba_size")))
File.CreateText(Path.Combine(key, ".romba_size")); System.IO.File.CreateText(Path.Combine(key, ".romba_size"));
if (!File.Exists(Path.Combine(key, ".romba_size.backup"))) if (!System.IO.File.Exists(Path.Combine(key, ".romba_size.backup")))
File.CreateText(Path.Combine(key, ".romba_size.backup")); System.IO.File.CreateText(Path.Combine(key, ".romba_size.backup"));
} }
} }

View File

@@ -55,7 +55,7 @@ contents of any changed dats.";
} }
// Make sure the file exists // Make sure the file exists
if (!File.Exists(_db)) if (!System.IO.File.Exists(_db))
EnsureDatabase(_db, _connectionString); EnsureDatabase(_db, _connectionString);
// Make sure the dats dir is set // Make sure the dats dir is set

View File

@@ -278,7 +278,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -30,7 +30,7 @@ namespace SabreTools.DatFiles.Formats
{ {
// Open a file reader // Open a file reader
Encoding enc = filename.GetEncoding(); Encoding enc = filename.GetEncoding();
SeparatedValueReader svr = new SeparatedValueReader(File.OpenRead(filename), enc) SeparatedValueReader svr = new SeparatedValueReader(System.IO.File.OpenRead(filename), enc)
{ {
Header = true, Header = true,
Quotes = false, Quotes = false,
@@ -125,7 +125,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -42,7 +42,7 @@ namespace SabreTools.DatFiles.Formats
{ {
// Open a file reader // Open a file reader
Encoding enc = filename.GetEncoding(); Encoding enc = filename.GetEncoding();
ClrMameProReader cmpr = new ClrMameProReader(File.OpenRead(filename), enc) ClrMameProReader cmpr = new ClrMameProReader(System.IO.File.OpenRead(filename), enc)
{ {
DosCenter = false, DosCenter = false,
Quotes = Quotes, Quotes = Quotes,
@@ -446,7 +446,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -32,7 +32,7 @@ namespace SabreTools.DatFiles.Formats
{ {
// Open a file reader // Open a file reader
Encoding enc = filename.GetEncoding(); Encoding enc = filename.GetEncoding();
ClrMameProReader cmpr = new ClrMameProReader(File.OpenRead(filename), enc) ClrMameProReader cmpr = new ClrMameProReader(System.IO.File.OpenRead(filename), enc)
{ {
DosCenter = true DosCenter = true
}; };
@@ -271,7 +271,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -31,7 +31,7 @@ namespace SabreTools.DatFiles.Formats
{ {
// Open a file reader // Open a file reader
Encoding enc = filename.GetEncoding(); Encoding enc = filename.GetEncoding();
SeparatedValueReader svr = new SeparatedValueReader(File.OpenRead(filename), enc) SeparatedValueReader svr = new SeparatedValueReader(System.IO.File.OpenRead(filename), enc)
{ {
Header = false, Header = false,
Quotes = false, Quotes = false,
@@ -122,7 +122,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -34,7 +34,7 @@ namespace SabreTools.DatFiles.Formats
{ {
// Open a file reader // Open a file reader
Encoding enc = filename.GetEncoding(); Encoding enc = filename.GetEncoding();
StreamReader sr = new StreamReader(File.OpenRead(filename), enc); StreamReader sr = new StreamReader(System.IO.File.OpenRead(filename), enc);
while (!sr.EndOfStream) while (!sr.EndOfStream)
{ {
@@ -250,7 +250,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -39,7 +39,7 @@ namespace SabreTools.DatFiles.Formats
{ {
// Open a file reader // Open a file reader
Encoding enc = filename.GetEncoding(); Encoding enc = filename.GetEncoding();
StreamReader sr = new StreamReader(File.OpenRead(filename), enc); StreamReader sr = new StreamReader(System.IO.File.OpenRead(filename), enc);
string gamename = string.Empty; string gamename = string.Empty;
while (!sr.EndOfStream) while (!sr.EndOfStream)
@@ -278,7 +278,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -1361,7 +1361,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -860,7 +860,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -674,7 +674,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -547,7 +547,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -376,7 +376,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -31,7 +31,7 @@ namespace SabreTools.DatFiles.Formats
public override void ParseFile(string filename, int indexId, bool keep, bool statsOnly = false, bool throwOnError = false) public override void ParseFile(string filename, int indexId, bool keep, bool statsOnly = false, bool throwOnError = false)
{ {
// Prepare all internal variables // Prepare all internal variables
StreamReader sr = new StreamReader(File.OpenRead(filename), new UTF8Encoding(false)); StreamReader sr = new StreamReader(System.IO.File.OpenRead(filename), new UTF8Encoding(false));
JsonTextReader jtr = new JsonTextReader(sr); JsonTextReader jtr = new JsonTextReader(sr);
// If we got a null reader, just return // If we got a null reader, just return
@@ -337,7 +337,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -36,7 +36,7 @@ namespace SabreTools.DatFiles.Formats
{ {
// Open a file reader // Open a file reader
Encoding enc = filename.GetEncoding(); Encoding enc = filename.GetEncoding();
SeparatedValueReader svr = new SeparatedValueReader(File.OpenRead(filename), enc) SeparatedValueReader svr = new SeparatedValueReader(System.IO.File.OpenRead(filename), enc)
{ {
Header = true, Header = true,
Quotes = true, Quotes = true,
@@ -108,7 +108,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -696,7 +696,7 @@ namespace SabreTools.DatFiles.Formats
try try
{ {
logger.User($"Writing to '{outfile}'..."); logger.User($"Writing to '{outfile}'...");
FileStream fs = File.Create(outfile); FileStream fs = System.IO.File.Create(outfile);
// If we get back null for some reason, just log and return // If we get back null for some reason, just log and return
if (fs == null) if (fs == null)

View File

@@ -1099,8 +1099,8 @@ namespace SabreTools.DatFiles
protected void EnsureDatabase() protected void EnsureDatabase()
{ {
// Make sure the file exists // Make sure the file exists
if (!File.Exists(ItemDictionaryFileName)) if (!System.IO.File.Exists(ItemDictionaryFileName))
File.Create(ItemDictionaryFileName); System.IO.File.Create(ItemDictionaryFileName);
// If we have no database connection, we can't do anything // If we have no database connection, we can't do anything
if (dbc == null) if (dbc == null)

View File

@@ -80,7 +80,7 @@ namespace SabreTools.DatTools
if (addBlanks) if (addBlanks)
ProcessDirectoryBlanks(datFile, basePath); ProcessDirectoryBlanks(datFile, basePath);
} }
else if (File.Exists(basePath)) else if (System.IO.File.Exists(basePath))
{ {
logger.Verbose($"File found: {basePath}"); logger.Verbose($"File found: {basePath}");