Skip to content

Commit 4d58c69

Browse files
committed
More style changes
1 parent e1d2bce commit 4d58c69

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

LiteDB/Client/Storage/LiteFileStream.Read.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.IO;
34
using System.Linq;
45
using static LiteDB.Constants;
@@ -7,6 +8,7 @@ namespace LiteDB
78
{
89
public partial class LiteFileStream<TFileId> : Stream
910
{
11+
private Dictionary<int, long> _chunkLengths = new Dictionary<int, long>();
1012
public override int Read(byte[] buffer, int offset, int count)
1113
{
1214
if (_mode != FileAccess.Read) throw new NotSupportedException();
@@ -85,6 +87,7 @@ private void SetReadStreamPosition(long newPosition)
8587
}
8688
newChunkIndex++;
8789
}
90+
8891
newChunkIndex--;
8992
seekStreamPosition -= _chunkLengths[newChunkIndex];
9093
_positionInChunk = (int)(_streamPosition - seekStreamPosition);

LiteDB/Client/Storage/LiteFileStream.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.IO;
43
using System.Linq;
54
using static LiteDB.Constants;
@@ -24,7 +23,6 @@ public partial class LiteFileStream<TFileId> : Stream
2423
private byte[] _currentChunkData = null;
2524
private int _positionInChunk = 0;
2625
private MemoryStream _buffer;
27-
private Dictionary<int, long> _chunkLengths = new Dictionary<int, long>();
2826

2927
internal LiteFileStream(ILiteCollection<LiteFileInfo<TFileId>> files, ILiteCollection<BsonDocument> chunks, LiteFileInfo<TFileId> file, BsonValue fileId, FileAccess mode)
3028
{

0 commit comments

Comments
 (0)