Fixes string interpolation
This commit is contained in:
parent
42d0b6271f
commit
7d3a0ca265
233 changed files with 758 additions and 690 deletions
|
|
@ -31,7 +31,7 @@ namespace Server.RemoteAdmin
|
|||
string outStr;
|
||||
if ( m_NewLine )
|
||||
{
|
||||
outStr = String.Format( "[{0}]: {1}", DateTime.UtcNow.ToString( DateFormat ), str );
|
||||
outStr = $"[{DateTime.UtcNow.ToString(DateFormat)}]: {str}";
|
||||
m_NewLine = false;
|
||||
}
|
||||
else
|
||||
|
|
@ -50,7 +50,7 @@ namespace Server.RemoteAdmin
|
|||
if ( m_NewLine )
|
||||
{
|
||||
string outStr;
|
||||
outStr = String.Format( "[{0}]: {1}", DateTime.UtcNow.ToString( DateFormat ), ch );
|
||||
outStr = $"[{DateTime.UtcNow.ToString(DateFormat)}]: {ch}";
|
||||
|
||||
m_ConsoleData.Append( outStr );
|
||||
SendToAll( outStr );
|
||||
|
|
@ -70,9 +70,9 @@ namespace Server.RemoteAdmin
|
|||
{
|
||||
string outStr;
|
||||
if ( m_NewLine )
|
||||
outStr = String.Format( "[{0}]: {1}{2}", DateTime.UtcNow.ToString( DateFormat ), line, Console.Out.NewLine );
|
||||
outStr = $"[{DateTime.UtcNow.ToString(DateFormat)}]: {line}{Console.Out.NewLine}";
|
||||
else
|
||||
outStr = String.Format( "{0}{1}", line, Console.Out.NewLine );
|
||||
outStr = $"{line}{Console.Out.NewLine}";
|
||||
|
||||
m_ConsoleData.Append( outStr );
|
||||
RoughTrimConsoleData();
|
||||
|
|
@ -126,7 +126,8 @@ namespace Server.RemoteAdmin
|
|||
}
|
||||
else if ( cmd == 0xFF )
|
||||
{
|
||||
string statStr = String.Format( ", Name={0}, Age={1}, Clients={2}, Items={3}, Chars={4}, Mem={5}K, Ver={6}", Misc.ServerList.ServerName, (int)(DateTime.UtcNow - Items.Clock.ServerStart).TotalHours, NetState.Instances.Count, World.Items.Count, World.Mobiles.Count, (int)(GC.GetTotalMemory( false ) / 1024), ProtocolVersion );
|
||||
string statStr =
|
||||
$", Name={Misc.ServerList.ServerName}, Age={(int) (DateTime.UtcNow - Items.Clock.ServerStart).TotalHours}, Clients={NetState.Instances.Count}, Items={World.Items.Count}, Chars={World.Mobiles.Count}, Mem={(int) (GC.GetTotalMemory(false) / 1024)}K, Ver={ProtocolVersion}";
|
||||
state.Send( new UOGInfo( statStr ) );
|
||||
state.Dispose();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue