Skip to content

Commit 32d2968

Browse files
committed
Fix commit d825f01
1 parent f2d3237 commit 32d2968

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

Algo/Storages/Csv/CsvEntityList.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ public interface ICsvEntityList
2020
/// CSV file name.
2121
/// </summary>
2222
string FileName { get; }
23-
24-
/// <summary>
25-
/// Create archived copy.
26-
/// </summary>
27-
bool CreateArchivedCopy { get; set; }
2823
}
2924

3025
/// <summary>
@@ -37,9 +32,6 @@ public abstract class CsvEntityList<TKey, TEntity> : SynchronizedList<TEntity>,
3732
{
3833
private readonly CachedSynchronizedDictionary<TKey, TEntity> _items = [];
3934

40-
private readonly SyncObject _copySync = new();
41-
private byte[] _copy;
42-
4335
/// <summary>
4436
/// The CSV storage of trading objects.
4537
/// </summary>
@@ -66,18 +58,6 @@ protected CsvEntityList(CsvEntityRegistry registry, string fileName)
6658
/// <inheritdoc />
6759
public string FileName { get; }
6860

69-
/// <inheritdoc />
70-
public bool CreateArchivedCopy { get; set; }
71-
72-
private void ResetCopy()
73-
{
74-
if (!CreateArchivedCopy)
75-
return;
76-
77-
lock (_copySync)
78-
_copy = null;
79-
}
80-
8161
#region IStorageEntityList<T>
8262

8363
private DelayAction.IGroup<CsvFileWriter> _delayActionGroup;
@@ -235,7 +215,6 @@ protected override bool OnAdding(TEntity item)
235215

236216
_delayActionGroup.Add((writer, data) =>
237217
{
238-
ResetCopy();
239218
Write(writer, data);
240219
}, item);
241220
}
@@ -292,7 +271,6 @@ protected override void OnCleared()
292271

293272
_delayActionGroup.Add(writer =>
294273
{
295-
ResetCopy();
296274
writer.Truncate();
297275
});
298276
}
@@ -306,8 +284,6 @@ private void WriteMany(TEntity[] values)
306284
{
307285
_delayActionGroup.Add((writer, state) =>
308286
{
309-
ResetCopy();
310-
311287
writer.Truncate();
312288

313289
foreach (var item in state)

0 commit comments

Comments
 (0)