- reset stream to position 0 before loading

master
Simon G 5 years ago
parent 11885d6345
commit 6233491abd
  1. 1
      GBase/DataHandling/XmlDataReader.cs

@ -40,6 +40,7 @@ namespace GBase.DataHandling
if (typeName == null)
throw new ArgumentNullException(nameof(typeName));
file.Seek(0, SeekOrigin.Begin); //reset stream to it's beginning to be able to load it
XDocument xmlDocument = await XDocument.LoadAsync(file, LoadOptions.None, cancellationToken);
file.Seek(0, SeekOrigin.Begin); //reset stream to it's beginning to be able to save it

Loading…
Cancel
Save