Fix IDE0090
This commit is contained in:
committed by
Pavel Penev
parent
164abfdae1
commit
8a285f9b19
@@ -41,8 +41,8 @@ namespace OpenRA.Server
|
||||
|
||||
long lastReceivedTime = 0;
|
||||
|
||||
readonly BlockingCollection<byte[]> sendQueue = new BlockingCollection<byte[]>();
|
||||
readonly Queue<int> pingHistory = new Queue<int>();
|
||||
readonly BlockingCollection<byte[]> sendQueue = new();
|
||||
readonly Queue<int> pingHistory = new();
|
||||
|
||||
public Connection(Server server, Socket socket, string authToken)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Server
|
||||
|
||||
public class MapStatusCache
|
||||
{
|
||||
readonly Dictionary<MapPreview, Session.MapStatus> cache = new Dictionary<MapPreview, Session.MapStatus>();
|
||||
readonly Dictionary<MapPreview, Session.MapStatus> cache = new();
|
||||
readonly Action<string, Session.MapStatus> onStatusChanged;
|
||||
readonly bool enableRemoteLinting;
|
||||
readonly ModData modData;
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace OpenRA.Server
|
||||
Stopwatch gameTimer;
|
||||
long nextUpdate = 0;
|
||||
|
||||
readonly ConcurrentDictionary<int, long> timestamps = new ConcurrentDictionary<int, long>();
|
||||
readonly ConcurrentDictionary<int, Queue<long>> deltas = new ConcurrentDictionary<int, Queue<long>>();
|
||||
readonly ConcurrentDictionary<int, long> timestamps = new();
|
||||
readonly ConcurrentDictionary<int, Queue<long>> deltas = new();
|
||||
|
||||
int timestep;
|
||||
int ticksPerInterval;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Server
|
||||
[TranslationReference("remaining")]
|
||||
const string ChatTemporaryDisabled = "notification-chat-temp-disabled";
|
||||
|
||||
readonly Dictionary<int, List<long>> messageTracker = new Dictionary<int, List<long>>();
|
||||
readonly Dictionary<int, List<long>> messageTracker = new();
|
||||
readonly Server server;
|
||||
readonly Action<Connection, int, int, byte[]> dispatchOrdersToClient;
|
||||
readonly Action<Connection, string, Dictionary<string, object>> sendLocalizedMessageTo;
|
||||
|
||||
@@ -115,15 +115,15 @@ namespace OpenRA.Server
|
||||
[TranslationReference]
|
||||
const string GameStarted = "notification-game-started";
|
||||
|
||||
public readonly MersenneTwister Random = new MersenneTwister();
|
||||
public readonly MersenneTwister Random = new();
|
||||
public readonly ServerType Type;
|
||||
|
||||
public readonly List<Connection> Conns = new List<Connection>();
|
||||
public readonly List<Connection> Conns = new();
|
||||
|
||||
public Session LobbyInfo;
|
||||
public ServerSettings Settings;
|
||||
public ModData ModData;
|
||||
public List<string> TempBans = new List<string>();
|
||||
public List<string> TempBans = new();
|
||||
|
||||
// Managed by LobbyCommands
|
||||
public MapPreview Map;
|
||||
@@ -134,19 +134,19 @@ namespace OpenRA.Server
|
||||
public int OrderLatency = 1;
|
||||
|
||||
readonly int randomSeed;
|
||||
readonly List<TcpListener> listeners = new List<TcpListener>();
|
||||
readonly TypeDictionary serverTraits = new TypeDictionary();
|
||||
readonly List<TcpListener> listeners = new();
|
||||
readonly TypeDictionary serverTraits = new();
|
||||
readonly PlayerDatabase playerDatabase;
|
||||
|
||||
OrderBuffer orderBuffer;
|
||||
|
||||
volatile ServerState internalState = ServerState.WaitingPlayers;
|
||||
|
||||
readonly BlockingCollection<IServerEvent> events = new BlockingCollection<IServerEvent>();
|
||||
readonly BlockingCollection<IServerEvent> events = new();
|
||||
|
||||
ReplayRecorder recorder;
|
||||
GameInformation gameInfo;
|
||||
readonly List<GameInformation.Player> worldPlayers = new List<GameInformation.Player>();
|
||||
readonly List<GameInformation.Player> worldPlayers = new();
|
||||
readonly Stopwatch pingUpdated = Stopwatch.StartNew();
|
||||
readonly PlayerMessageTracker playerMessageTracker;
|
||||
|
||||
@@ -802,7 +802,7 @@ namespace OpenRA.Server
|
||||
recorder = null;
|
||||
}
|
||||
|
||||
readonly Dictionary<int, byte[]> syncForFrame = new Dictionary<int, byte[]>();
|
||||
readonly Dictionary<int, byte[]> syncForFrame = new();
|
||||
int lastDefeatStateFrame;
|
||||
ulong lastDefeatState;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user