From a29700e38bf6d750087a75403f6c155cc8c29d36 Mon Sep 17 00:00:00 2001 From: Simon G Date: Fri, 13 Nov 2020 19:35:10 +0100 Subject: [PATCH] - remove bool return value and todo --- GBase/DataHandling/XmlDataWriter.cs | 6 ++---- GBase/Interfaces/DataHandling/IDataWriter.cs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/GBase/DataHandling/XmlDataWriter.cs b/GBase/DataHandling/XmlDataWriter.cs index 31cfc74..519d7c7 100644 --- a/GBase/DataHandling/XmlDataWriter.cs +++ b/GBase/DataHandling/XmlDataWriter.cs @@ -27,18 +27,16 @@ namespace GBase.DataHandling /// A to cancel the async operation /// Returns true if successful, false if not /// No root element found - public async Task InitFile(FileStream file, string rootElementName, CancellationToken cancellationToken) + public async Task InitFile(FileStream file, string rootElementName, CancellationToken cancellationToken) { //if the xml file isn't empty, return if (file.Length > 3) //> 3 because of BOM - return true; //TODO: Don't return bool? + return; XDocument xmlDocument = new XDocument(); xmlDocument.Add(new XElement(rootElementName)); file.Seek(0, SeekOrigin.Begin); //reset stream to it's beginning to be able to save it await xmlDocument.SaveAsync(file, SaveOptions.OmitDuplicateNamespaces, cancellationToken); - - return true; } /// diff --git a/GBase/Interfaces/DataHandling/IDataWriter.cs b/GBase/Interfaces/DataHandling/IDataWriter.cs index 98ffef4..01d3c65 100644 --- a/GBase/Interfaces/DataHandling/IDataWriter.cs +++ b/GBase/Interfaces/DataHandling/IDataWriter.cs @@ -21,7 +21,7 @@ namespace GBase.Interfaces.DataHandling /// /// A to cancel the async operation /// Returns true if successful, false if not - Task InitFile(FileStream file, string rootElementName, CancellationToken cancellationToken); + Task InitFile(FileStream file, string rootElementName, CancellationToken cancellationToken); /// /// Write the data of a property