clean up and various little improvements after search for static wasted memory objects (not found) At this point it appears I don't have any leaks and it's all pretty efficient.

This commit is contained in:
2020-06-05 23:36:44 +00:00
parent cbf65f9046
commit bbcbdd86d0
17 changed files with 56 additions and 409 deletions

View File

@@ -87,19 +87,6 @@ namespace AyaNova.Util
}
// /// <summary>
// /// Delete a utility file (backup folder file)
// /// </summary>
// /// <param name="fileName"></param>
// internal static void DeleteUtilityFile(string fileName)
// {
// var utilityFilePath = GetFullPathForUtilityFile(fileName);
// if (File.Exists(utilityFilePath))
// {
// File.Delete(utilityFilePath);
// }
// }
public class BackupFileInfo
{
public string length { get; set; }
@@ -311,42 +298,6 @@ namespace AyaNova.Util
return zipEntries;
}
// /// <summary>
// /// Import utility - get individual files specified in zip archive as JSON objects
// ///
// /// </summary>
// /// <param name="zipFileName">Name of utility zip import file</param>
// /// <param name="entryList">Name of entries in utility file archive to fetch</param>
// /// <returns></returns>
// internal static List<JObject> ZipGetUtilityArchiveEntriesAsJsonObjects(List<string> entryList, string zipFileName)
// {
// List<JObject> jList = new List<JObject>();
// var zipPath = GetFullPathForUtilityFile(zipFileName);
// using (ZipArchive archive = ZipFile.OpenRead(zipPath))
// {
// foreach (string importFileName in entryList)
// {
// ZipArchiveEntry entry = archive.GetEntry(importFileName);
// if (entry != null)
// {
// //stream entry into a new jobject and add it to the list
// StreamReader reader = new StreamReader(entry.Open());
// string text = reader.ReadToEnd();
// var j = JObject.Parse(text);
// //Here add v7 import file name as sometimes it's needed later (Translations)
// j.Add("V7_SOURCE_FILE_NAME", JToken.FromObject(importFileName));
// jList.Add(j);
// }
// }
// }
// return jList;
// }
#endregion Zip handling
#region Attachment file handling