StyleCop clean ReplayRecorderConnection
This commit is contained in:
@@ -25,6 +25,17 @@ namespace OpenRA.Network
|
|||||||
Func<string> chooseFilename;
|
Func<string> chooseFilename;
|
||||||
MemoryStream preStartBuffer = new MemoryStream();
|
MemoryStream preStartBuffer = new MemoryStream();
|
||||||
|
|
||||||
|
static bool IsGameStart(byte[] data)
|
||||||
|
{
|
||||||
|
if (data.Length == 5 && data[4] == 0xbf)
|
||||||
|
return false;
|
||||||
|
if (data.Length >= 5 && data[4] == 0x65)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
var frame = BitConverter.ToInt32(data, 0);
|
||||||
|
return frame == 0 && data.ToOrderList(null).Any(o => o.OrderString == "StartGame");
|
||||||
|
}
|
||||||
|
|
||||||
public ReplayRecorderConnection(IConnection inner, Func<string> chooseFilename)
|
public ReplayRecorderConnection(IConnection inner, Func<string> chooseFilename)
|
||||||
{
|
{
|
||||||
this.chooseFilename = chooseFilename;
|
this.chooseFilename = chooseFilename;
|
||||||
@@ -85,17 +96,6 @@ namespace OpenRA.Network
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool IsGameStart(byte[] data)
|
|
||||||
{
|
|
||||||
if (data.Length == 5 && data[4] == 0xbf)
|
|
||||||
return false;
|
|
||||||
if (data.Length >= 5 && data[4] == 0x65)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
var frame = BitConverter.ToInt32(data, 0);
|
|
||||||
return frame == 0 && data.ToOrderList(null).Any(o => o.OrderString == "StartGame");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool disposed;
|
bool disposed;
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
|||||||
Reference in New Issue
Block a user