Moved export code into region

This commit is contained in:
Thorsten Sommer 2023-01-02 20:50:11 +01:00
parent cdffce9bbd
commit 7676bea101
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -66,7 +66,7 @@ public sealed class DataContext : DbContext, IDataContext
#endregion #endregion
} }
#region Export and import data structures #region Export and import
private readonly record struct JsonData( private readonly record struct JsonData(
IEnumerable<JsonSetting> Settings, IEnumerable<JsonSetting> Settings,
@ -138,8 +138,6 @@ public sealed class DataContext : DbContext, IDataContext
JsonUniqueId TextElementUniqueId JsonUniqueId TextElementUniqueId
); );
#endregion
public async Task ExportAsync(string path) public async Task ExportAsync(string path)
{ {
var jsonSettings = new JsonSerializerOptions var jsonSettings = new JsonSerializerOptions
@ -158,4 +156,6 @@ public sealed class DataContext : DbContext, IDataContext
Translations = this.Translations.Select(n => n.ToJsonTranslation()), Translations = this.Translations.Select(n => n.ToJsonTranslation()),
}, jsonSettings); }, jsonSettings);
} }
#endregion
} }