Fixes string interpolation
This commit is contained in:
parent
42d0b6271f
commit
7d3a0ca265
233 changed files with 758 additions and 690 deletions
|
|
@ -42,8 +42,8 @@ namespace Server.Engines.MyRunUO
|
|||
|
||||
public static string CompileConnectionString()
|
||||
{
|
||||
string connectionString = String.Format( "DRIVER={0};SERVER={1};DATABASE={2};UID={3};PASSWORD={4};",
|
||||
DatabaseDriver, DatabaseServer, DatabaseName, DatabaseUserID, DatabasePassword );
|
||||
string connectionString =
|
||||
$"DRIVER={DatabaseDriver};SERVER={DatabaseServer};DATABASE={DatabaseName};UID={DatabaseUserID};PASSWORD={DatabasePassword};";
|
||||
|
||||
return connectionString;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ namespace Server.Engines.MyRunUO
|
|||
|
||||
public StreamWriter GetUniqueWriter( string type, out string filePath )
|
||||
{
|
||||
filePath = Path.Combine( Core.BaseDirectory, String.Format( "myrunuodb_{0}.txt", type ) ).Replace( Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar );
|
||||
filePath = Path.Combine( Core.BaseDirectory, $"myrunuodb_{type}.txt").Replace( Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar );
|
||||
|
||||
try
|
||||
{
|
||||
|
|
@ -544,7 +544,7 @@ namespace Server.Engines.MyRunUO
|
|||
{
|
||||
try
|
||||
{
|
||||
filePath = Path.Combine( Core.BaseDirectory, String.Format( "myrunuodb_{0}_{1}.txt", type, i ) ).Replace( Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar );
|
||||
filePath = Path.Combine( Core.BaseDirectory, $"myrunuodb_{type}_{i}.txt").Replace( Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar );
|
||||
return new StreamWriter( filePath );
|
||||
}
|
||||
catch
|
||||
|
|
@ -639,7 +639,7 @@ namespace Server.Engines.MyRunUO
|
|||
|
||||
ExecuteNonQueryIfNull(
|
||||
String.Format( "SELECT guild_1 FROM myrunuo_guilds_wars WHERE (guild_1={0} AND guild_2={1}) OR (guild_1={1} AND guild_2={0})", ourId, theirId ),
|
||||
String.Format( "INSERT INTO myrunuo_guilds_wars (guild_1, guild_2) VALUES ({0}, {1})", ourId, theirId ) );
|
||||
$"INSERT INTO myrunuo_guilds_wars (guild_1, guild_2) VALUES ({ourId}, {theirId})");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ namespace Server.Engines.MyRunUO
|
|||
Mobile mob = ns.Mobile;
|
||||
|
||||
if ( mob != null )
|
||||
m_Command.Enqueue( String.Format( "INSERT INTO myrunuo_status (char_id) VALUES ({0})", mob.Serial.Value.ToString() ) );
|
||||
m_Command.Enqueue(
|
||||
$"INSERT INTO myrunuo_status (char_id) VALUES ({mob.Serial.Value.ToString()})");
|
||||
}
|
||||
}
|
||||
catch ( Exception e )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue