update
This commit is contained in:
@@ -13,6 +13,8 @@ public class JsonFileContainer(string filePath) : JsonDataContainer
|
|||||||
using var sw = new StreamReader(filePath);
|
using var sw = new StreamReader(filePath);
|
||||||
GetSerializer().Populate(sw, this);
|
GetSerializer().Populate(sw, this);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
sets.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,14 @@ public class JsonStreamContainer(Stream stream) : JsonDataContainer
|
|||||||
{
|
{
|
||||||
lock (_lock_StreamAction)
|
lock (_lock_StreamAction)
|
||||||
{
|
{
|
||||||
using var sw = new StreamReader(stream);
|
if (stream.Length != 0)
|
||||||
stream.Position = 0;
|
{
|
||||||
GetSerializer().Populate(sw, this);
|
using var sw = new StreamReader(stream);
|
||||||
|
stream.Position = 0;
|
||||||
|
GetSerializer().Populate(sw, this);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sets.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user