Skip to content
This repository was archived by the owner on Oct 8, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project>
<PropertyGroup>
<Version>2026.07.01.1</Version>
<Version>2026.09.01.1</Version>
<Company>vov4uk</Company>
<Copyright>Copyright (C) vov4uk</Copyright>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
</PropertyGroup>
</Project>
25 changes: 11 additions & 14 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@
<PackageVersion Include="DataGridExtensions" Version="2.9.1" />
<PackageVersion Include="DotNetProjects.Extended.Wpf.Toolkit" Version="5.0.129" />
<PackageVersion Include="iNKORE.UI.WPF.Emojis" Version="0.3.6.4" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.142" />
<PackageVersion Include="MiniExcel" Version="1.45.0" />
<PackageVersion Include="Microsoft.Testing.Platform.MSBuild" Version="2.4.0" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.158" />
<PackageVersion Include="MiniExcel" Version="1.46.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
<PackageVersion Include="NLog" Version="6.1.4" />
<PackageVersion Include="NLog" Version="6.2.0" />
<PackageVersion Include="Onova" Version="2.6.13" />
<PackageVersion Include="Ookii.Dialogs.Wpf" Version="5.0.1" />
<PackageVersion Include="Prism.Core" Version="9.0.537" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.29.0.143774" />
<PackageVersion Include="SQLitePCLRaw.core" Version="2.1.12" />
<PackageVersion Include="SQLitePCLRaw.lib.e_sqlite3" Version="2.1.12" />
<PackageVersion Include="SQLitePCLRaw.provider.e_sqlite3" Version="2.1.12" />
<PackageVersion Include="SQLitePCLRaw.bundle_e_sqlite3" Version="2.1.12" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.34.0.3385" />
<PackageVersion Include="System.Linq.Async" Version="7.0.1" />
<PackageVersion Include="Tabula" Version="1.0.1" />
<PackageVersion Include="ToastNotifications.Messages.Net5" Version="3.0.1" />
Expand All @@ -30,18 +27,18 @@
<!-- Production packages - Financier.Reports -->
<PackageVersion Include="OxyPlot.Wpf" Version="2.2.0" />
<!-- Production packages - Financier.DataAccess -->
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.10" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.12" />
<!-- Production packages - Financier.Adapter -->
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<!-- Test packages -->
<PackageVersion Include="AutoFixture" Version="4.18.1" />
<PackageVersion Include="AutoFixture.AutoMoq" Version="4.18.1" />
<PackageVersion Include="AutoFixture.Xunit3" Version="4.19.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.10.0" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageVersion Include="xunit.v3" Version="3.2.2" />
<PackageVersion Include="xunit.v3.assert" Version="3.2.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageVersion Include="xunit.v3" Version="4.0.0" />
<PackageVersion Include="xunit.v3.assert" Version="4.0.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="4.0.0" />
</ItemGroup>
</Project>
</Project>
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
14 changes: 7 additions & 7 deletions src/Financier.Adapter/EntityReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public class EntityReader : IEntityReader
List<Entity> entities = new List<Entity>();

var entityTypes = _entityTypes.Value;
Entity entity = null!;
EntityInfo entityInfo = null!;
Entity entity = null;
EntityInfo entityInfo = null;
string prevField = string.Empty;
string entityType = string.Empty;

Expand All @@ -38,7 +38,7 @@ public class EntityReader : IEntityReader
{
prevField = string.Empty;
entityType = line.Value!;
if (!string.IsNullOrEmpty(line.Value) && entityTypes.TryGetValue(line.Value, out entityInfo!))
if (!string.IsNullOrEmpty(line.Value) && entityTypes.TryGetValue(line.Value, out entityInfo))
{
entity = entityInfo.Factory();
}
Expand All @@ -57,17 +57,17 @@ public class EntityReader : IEntityReader
}
else if (entity != null && line.Value != null)
{
if (entityInfo.Properties.TryGetValue(line.Key!, out var property))
if (entityInfo.Properties.TryGetValue(line.Key, out var property))
{
property.SetValue(entity, line.Value);
}

var order = EntityColumnsOrder[entityType];
if (columnsSeen[entityType].Add(line.Key!))
{
order.Insert(order.IndexOf(prevField) + 1, line.Key!);
order.Insert(order.IndexOf(prevField) + 1, line.Key);
}
prevField = line.Key!;
prevField = line.Key;
}
}

Expand Down Expand Up @@ -116,7 +116,7 @@ private static IReadOnlyDictionary<string, EntityInfo> BuildEntityTypes()

private static Func<Entity> BuildFactory(Type type)
{
var ctor = type.GetConstructor(Type.EmptyTypes)!;
var ctor = type.GetConstructor(Type.EmptyTypes);
var newExpr = Expression.New(ctor);
var cast = Expression.Convert(newExpr, typeof(Entity));
return Expression.Lambda<Func<Entity>>(cast).Compile();
Expand Down
9 changes: 8 additions & 1 deletion src/Financier.Common/Entities/DbManual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public static class DbManual
private static Dictionary<string, Mcc> _mccTitles;
private static Dictionary<int, Mcc> _mccCodes;
private static Dictionary<int, ProjectModel> _projectIds;
private static Dictionary<int, CurrencyModel> _currencyIds;
private static List<List<string>> _allCurrencies;

public static async Task SetupAsync(IFinancierDatabase financierDatabase)
Expand Down Expand Up @@ -111,6 +112,8 @@ FROM category ctx
{
Name = Localization.LocalizationService.Instance.all_currencies
});

_currencyIds = _currencies.Where(c => c.Id.HasValue).ToDictionary(c => c.Id.Value, c => c);
}

if (_payee == null)
Expand Down Expand Up @@ -181,6 +184,8 @@ FROM v_report_transactions

public static Dictionary<int, ProjectModel> ProjectIds => _projectIds ?? new();

public static Dictionary<int, CurrencyModel> CurrencyIds => _currencyIds ?? new();

public static List<YearMonths> YearMonths => _yearMonths ?? new();

public static List<Years> Years => _years ?? new();
Expand Down Expand Up @@ -282,6 +287,7 @@ public static void ResetAllDatabaseManuals()
_category = null;
_topCategory = null;
_currencies = null;
_currencyIds = null;
_payee = null;
_project = null;
_yearMonths = null;
Expand All @@ -299,7 +305,7 @@ public static void ResetManuals(string manual)
case nameof(Account): _accounts = null; break;
case nameof(MCCEnums): _mccEnums = null; break;
case nameof(MCCTitles): _mccTitles = null; break;
case nameof(Currencies): _currencies = null; break;
case nameof(Currencies): _currencies = null; _currencyIds = null; break;
case nameof(Category): _category = null; _topCategory = null; break;
default:
break;
Expand Down Expand Up @@ -359,6 +365,7 @@ internal static void SetupTests(List<LocationModel> loc)
internal static void SetupTests(List<CurrencyModel> cur)
{
_currencies = cur;
_currencyIds = cur.Where(c => c.Id.HasValue).ToDictionary(c => c.Id.Value, c => c);
}

internal static void SetupTests(List<AccountFilterModel> acc)
Expand Down
2 changes: 1 addition & 1 deletion src/Financier.Common/Localization/LocalizationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private string Get([CallerMemberName] string key = null)
// RecipesWizard Page1
public string recipe_wizard_total_format => Get();
// MainWindow Messages
public string backup_done => Get();

public string import_result => Get();
public string import_result_with_duplicates => Get();
public string saved_message => Get();
Expand Down
Loading
Loading