Targets .NET Core 3.0 (#39)
This commit is contained in:
parent
0993c03b70
commit
08bf44af9a
125 changed files with 1473 additions and 14244 deletions
|
|
@ -28,16 +28,12 @@ namespace Server
|
|||
private FileQueue fileQueue;
|
||||
private FileStream fileStream;
|
||||
|
||||
private SaveMetrics metrics;
|
||||
|
||||
private AsyncCallback writeCallback;
|
||||
|
||||
public SequentialFileWriter(string path, SaveMetrics metrics)
|
||||
public SequentialFileWriter(string path)
|
||||
{
|
||||
if (path == null) throw new ArgumentNullException("path");
|
||||
|
||||
this.metrics = metrics;
|
||||
|
||||
fileStream = FileOperations.OpenSequentialStream(path, FileMode.Create, FileAccess.Write, FileShare.None);
|
||||
|
||||
fileQueue = new FileQueue(
|
||||
|
|
@ -66,8 +62,6 @@ namespace Server
|
|||
{
|
||||
fileStream.Write(chunk.Buffer, chunk.Offset, chunk.Size);
|
||||
|
||||
metrics?.OnFileWritten(chunk.Size);
|
||||
|
||||
chunk.Commit();
|
||||
}
|
||||
else
|
||||
|
|
@ -84,8 +78,6 @@ namespace Server
|
|||
|
||||
fileStream.EndWrite(asyncResult);
|
||||
|
||||
metrics?.OnFileWritten(chunk.Size);
|
||||
|
||||
chunk.Commit();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue