Compare commits

...

13 Commits

Author SHA1 Message Date
Stefan Markovic
fe8c675c88 Test 2024-01-25 12:13:51 +01:00
Gokce Kantarci
565d48f574 Merge branch 'PTRun---JSON-Storage-Improvements' of https://github.com/gokcekantarci/PowerToys into PTRun---JSON-Storage-Improvements 2024-01-24 17:03:36 +03:00
Gokce Kantarci
b543f3405b [PTRun] CheckWithInformationFileToClear reversed. 2024-01-24 17:03:01 +03:00
Gokce Kantarci
50b5138b7f [PTRun] Merge main 2024-01-24 13:51:05 +03:00
Gokce Kantarci
78e0acec71 [PTRun] Removed unncessary parts 2024-01-24 13:20:25 +03:00
Gokce Kantarci
3fb965f35d [PTRun] Build fix 2024-01-16 15:03:54 +03:00
Gokce Kantarci
497bc828a0 [PTRun] Main merge 2024-01-16 14:52:03 +03:00
Gokce Kantarci
a98cce720c [PT Run] - ExtractFields function removed.
- Creating instance is used instead of deserializing.
2023-12-29 16:20:30 +03:00
Gokce Kantarci
f3334145e1 [PTRun] Unnecessary null check is removed. 2023-12-26 17:43:25 +03:00
Gokce Kantarci
5b2bee71e2 [PTRun] New JsonSerializerOptions added for information files. 2023-12-07 17:03:57 +03:00
Gokce Kantarci
9e6ca64247 [PTRun] Spell checks. 2023-12-05 15:22:39 +03:00
Gokce Kantarci
e440886e39 [PTRun] Removed uncessary parts. 2023-12-05 14:09:42 +03:00
Gokce Kantarci
3c9c82effb [PTRun] Implemented a new JSON storage method for PTRun settings files. 2023-12-04 15:59:26 +03:00
8 changed files with 706 additions and 42 deletions

View File

@@ -0,0 +1,431 @@
<Project>
<PropertyGroup>
<AssemblyName>PowerToys.PowerLauncher</AssemblyName>
<IntermediateOutputPath>obj\x64\Debug\</IntermediateOutputPath>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<MSBuildProjectExtensionsPath>C:\Users\stefa\Projects\PowerToys\src\modules\launcher\PowerLauncher\obj\</MSBuildProjectExtensionsPath>
<_TargetAssemblyProjectName>PowerLauncher</_TargetAssemblyProjectName>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="..\..\..\Version.props" />
<PropertyGroup>
<AssemblyTitle>PowerToys.Run</AssemblyTitle>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<StartupObject>PowerLauncher.App</StartupObject>
<ApplicationIcon>Assets\PowerLauncher\RunResource.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<AssetTargetFallback>uap10.0.19041</AssetTargetFallback>
<Version>$(Version).0</Version>
<Authors>Microsoft Corporation</Authors>
<Description>PowerToys PowerLauncher</Description>
<AssemblyName>PowerToys.PowerLauncher</AssemblyName>
<OutputPath>..\..\..\..\$(Platform)\$(Configuration)</OutputPath>
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
<SelfContained>true</SelfContained>
</PropertyGroup>
<!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DefineConstants>TRACE;RELEASE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<None Remove="Assets\PowerLauncher\app_error.dark.png" />
<None Remove="Assets\PowerLauncher\app_error.light.png" />
<None Remove="Assets\PowerLauncher\RunResource.ico" />
</ItemGroup>
<ItemGroup>
<Content Include="Assets\PowerLauncher\app_error.dark.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\PowerLauncher\app_error.light.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" />
<PackageReference Include="Interop.Microsoft.Office.Interop.OneNote" />
<PackageReference Include="Mages" />
<PackageReference Include="LazyCache" />
<PackageReference Include="Microsoft.Data.Sqlite" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" />
<PackageReference Include="ScipBe.Common.Office.OneNote" />
<PackageReference Include="System.Drawing.Common">
<ExcludeAssets>runtime</ExcludeAssets>
<!-- Should already be present on .net sdk runtime, so we avoid the conflicting runtime version from nuget -->
</PackageReference>
<PackageReference Include="System.Reactive" />
<PackageReference Include="System.Data.OleDb" />
<PackageReference Include="System.ServiceProcess.ServiceController" />
<PackageReference Include="UnitsNet" />
<PackageReference Include="WPF-UI" />
<!-- HACK: Microsoft.Extensions.Hosting is referenced, even if it is not used, to force dll versions to be the same as in other projects. Really only needed since OneNote uses the LazyCache and NLog dependencies, which references older assemblies. -->
<PackageReference Include="Microsoft.Extensions.Hosting" />
<PackageReference Include="System.Diagnostics.EventLog">
<!-- This package is a dependency of Microsoft.Extensions.Logging.EventLog, but we need to set it here so we can exclude the assets, so it doesn't conflict with the 8.0.1 dll coming from .NET SDK. -->
<ExcludeAssets>runtime</ExcludeAssets>
<!-- Should already be present on .net sdk runtime, so we avoid the conflicting runtime version from nuget -->
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\common\GPOWrapperProjection\GPOWrapperProjection.csproj" />
<ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" />
<ProjectReference Include="..\..\..\common\ManagedCommon\ManagedCommon.csproj" />
<ProjectReference Include="..\..\..\common\Common.UI\Common.UI.csproj" />
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
<ProjectReference Include="..\PowerLauncher.Telemetry\PowerLauncher.Telemetry.csproj" />
<ProjectReference Include="..\Wox.Infrastructure\Wox.Infrastructure.csproj" />
<ProjectReference Include="..\Wox.Plugin\Wox.Plugin.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Update="Assets\PowerLauncher\RunAsset.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\Accessibility.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\controlzex\6.0.0\lib\net5.0-windows7.0\ControlzEx.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\hyjiacan.pinyin4net\4.1.1\lib\net7.0\hyjiacan.py4n.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\interop.microsoft.office.interop.onenote\1.1.0.2\lib\netstandard2.0\Interop.Microsoft.Office.Interop.OneNote.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\lazycache\2.4.0\lib\netstandard2.0\LazyCache.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\mages\2.0.1\lib\netstandard2.0\Mages.Core.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\Microsoft.CSharp.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.data.sqlite.core\8.0.0\lib\net8.0\Microsoft.Data.Sqlite.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.caching.abstractions\2.1.0\lib\netstandard2.0\Microsoft.Extensions.Caching.Abstractions.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.caching.memory\2.1.0\lib\netstandard2.0\Microsoft.Extensions.Caching.Memory.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.configuration.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Abstractions.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.configuration.binder\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Binder.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.configuration.commandline\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.CommandLine.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.configuration.environmentvariables\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.configuration.fileextensions\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.FileExtensions.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.configuration.json\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Json.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.configuration.usersecrets\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.UserSecrets.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.dependencyinjection\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.diagnostics.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Diagnostics.Abstractions.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.diagnostics\8.0.0\lib\net8.0\Microsoft.Extensions.Diagnostics.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.fileproviders.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.FileProviders.Abstractions.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.fileproviders.physical\8.0.0\lib\net8.0\Microsoft.Extensions.FileProviders.Physical.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.filesystemglobbing\8.0.0\lib\net8.0\Microsoft.Extensions.FileSystemGlobbing.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.hosting.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Hosting.Abstractions.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.hosting\8.0.0\lib\net8.0\Microsoft.Extensions.Hosting.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.logging.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Abstractions.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.logging.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Configuration.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.logging.console\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Console.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.logging.debug\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Debug.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.logging\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.logging.eventlog\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.EventLog.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.logging.eventsource\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.EventSource.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.options.configurationextensions\8.0.0\lib\net8.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.options\8.0.0\lib\net8.0\Microsoft.Extensions.Options.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.primitives\8.0.0\lib\net8.0\Microsoft.Extensions.Primitives.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.toolkit.uwp.notifications\7.1.2\lib\net5.0-windows10.0.17763\Microsoft.Toolkit.Uwp.Notifications.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\Microsoft.VisualBasic.Core.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\Microsoft.VisualBasic.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\Microsoft.VisualBasic.Forms.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\Microsoft.Win32.Primitives.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\Microsoft.Win32.Registry.AccessControl.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\Microsoft.Win32.Registry.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\Microsoft.Win32.SystemEvents.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.windows.sdk.net.ref\10.0.20348.31\lib\net6.0\Microsoft.Windows.SDK.NET.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.xaml.behaviors.wpf\1.1.39\lib\net5.0-windows7.0\Microsoft.Xaml.Behaviors.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\mscorlib.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\netstandard.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\nlog\5.2.8\lib\netstandard2.0\NLog.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\nlog.extensions.logging\5.3.8\lib\net8.0\NLog.Extensions.Logging.dll" />
<ReferencePath Include="C:\Users\stefa\Projects\PowerToys\src\common\Common.UI\bin\x64\Debug\net8.0-windows\PowerToys.Common.UI.dll" />
<ReferencePath Include="C:\Users\stefa\Projects\PowerToys\src\common\GPOWrapperProjection\bin\x64\Debug\net8.0-windows10.0.20348.0\PowerToys.GPOWrapperProjection.dll" />
<ReferencePath Include="C:\Users\stefa\Projects\PowerToys\x64\Debug\PowerToys.Interop.dll" />
<ReferencePath Include="C:\Users\stefa\Projects\PowerToys\src\common\ManagedCommon\bin\x64\Debug\net8.0-windows\PowerToys.ManagedCommon.dll" />
<ReferencePath Include="C:\Users\stefa\Projects\PowerToys\src\common\ManagedTelemetry\Telemetry\bin\x64\Debug\net8.0-windows\PowerToys.ManagedTelemetry.dll" />
<ReferencePath Include="C:\Users\stefa\Projects\PowerToys\src\modules\launcher\PowerLauncher.Telemetry\bin\x64\Debug\net8.0-windows\PowerToys.PowerLauncher.Telemetry.dll" />
<ReferencePath Include="C:\Users\stefa\Projects\PowerToys\src\settings-ui\Settings.UI.Library\bin\x64\Debug\net8.0-windows\win-x64\PowerToys.Settings.UI.Lib.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\PresentationCore.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\PresentationFramework.Aero.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\PresentationFramework.Aero2.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\PresentationFramework.AeroLite.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\PresentationFramework.Classic.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\PresentationFramework.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\PresentationFramework.Luna.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\PresentationFramework.Royale.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\PresentationUI.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\ReachFramework.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\scipbe.common.office.onenote\3.0.1\lib\netstandard2.0\ScipBe.Common.Office.OneNote.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\sqlitepclraw.bundle_e_sqlite3\2.1.6\lib\netstandard2.0\SQLitePCLRaw.batteries_v2.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\sqlitepclraw.core\2.1.6\lib\netstandard2.0\SQLitePCLRaw.core.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\sqlitepclraw.provider.e_sqlite3\2.1.6\lib\net6.0-windows7.0\SQLitePCLRaw.provider.e_sqlite3.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.AppContext.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Buffers.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.CodeDom.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Collections.Concurrent.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Collections.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Collections.Immutable.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Collections.NonGeneric.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Collections.Specialized.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.ComponentModel.Annotations.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.ComponentModel.DataAnnotations.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.ComponentModel.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.ComponentModel.EventBasedAsync.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.ComponentModel.Primitives.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.ComponentModel.TypeConverter.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Configuration.ConfigurationManager.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Configuration.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Console.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Core.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Data.Common.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Data.DataSetExtensions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Data.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\system.data.oledb\8.0.0\lib\net8.0\System.Data.OleDb.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Design.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.Contracts.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.Debug.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.DiagnosticSource.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.EventLog.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.FileVersionInfo.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.PerformanceCounter.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.Process.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.StackTrace.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.TextWriterTraceListener.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.Tools.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.TraceSource.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Diagnostics.Tracing.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.DirectoryServices.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\system.drawing.common\8.0.1\lib\net8.0\System.Drawing.Common.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Drawing.Design.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Drawing.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Drawing.Primitives.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Dynamic.Runtime.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Formats.Asn1.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Formats.Tar.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Globalization.Calendars.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Globalization.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Globalization.Extensions.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\system.io.abstractions\17.2.3\lib\net6.0\System.IO.Abstractions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.Compression.Brotli.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.Compression.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.Compression.FileSystem.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.Compression.ZipFile.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.FileSystem.AccessControl.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.FileSystem.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.FileSystem.DriveInfo.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.FileSystem.Primitives.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.FileSystem.Watcher.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.IsolatedStorage.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.MemoryMappedFiles.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.IO.Packaging.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.Pipes.AccessControl.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.Pipes.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.IO.UnmanagedMemoryStream.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Linq.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Linq.Expressions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Linq.Parallel.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Linq.Queryable.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\system.management\8.0.0\lib\net8.0\System.Management.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Memory.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.Http.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.Http.Json.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.HttpListener.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.Mail.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.NameResolution.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.NetworkInformation.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.Ping.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.Primitives.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.Quic.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.Requests.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.Security.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.ServicePoint.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.Sockets.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.WebClient.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.WebHeaderCollection.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.WebProxy.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.WebSockets.Client.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Net.WebSockets.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Numerics.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Numerics.Vectors.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.ObjectModel.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Printing.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\system.reactive\6.0.0-preview.9\lib\net6.0-windows10.0.19041\System.Reactive.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Reflection.DispatchProxy.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Reflection.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Reflection.Emit.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Reflection.Emit.ILGeneration.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Reflection.Emit.Lightweight.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Reflection.Extensions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Reflection.Metadata.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Reflection.Primitives.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Reflection.TypeExtensions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Resources.Extensions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Resources.Reader.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Resources.ResourceManager.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Resources.Writer.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.CompilerServices.Unsafe.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.CompilerServices.VisualC.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.Extensions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.Handles.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.InteropServices.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.InteropServices.JavaScript.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.InteropServices.RuntimeInformation.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.Intrinsics.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.Loader.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.Numerics.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.Serialization.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.Serialization.Formatters.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.Serialization.Json.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.Serialization.Primitives.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Runtime.Serialization.Xml.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.AccessControl.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Claims.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.Algorithms.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.Cng.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.Csp.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.Encoding.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.OpenSsl.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.Pkcs.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.Primitives.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.ProtectedData.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.X509Certificates.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Security.Cryptography.Xml.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Security.Permissions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Principal.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.Principal.Windows.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Security.SecureString.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.ServiceModel.Web.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.ServiceProcess.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\system.serviceprocess.servicecontroller\8.0.0\lib\net8.0\System.ServiceProcess.ServiceController.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Text.Encoding.CodePages.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Text.Encoding.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Text.Encoding.Extensions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Text.Encodings.Web.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Text.Json.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Text.RegularExpressions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Threading.AccessControl.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Threading.Channels.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Threading.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Threading.Overlapped.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Threading.Tasks.Dataflow.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Threading.Tasks.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Threading.Tasks.Extensions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Threading.Tasks.Parallel.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Threading.Thread.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Threading.ThreadPool.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Threading.Timer.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Transactions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Transactions.Local.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.ValueTuple.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Web.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Web.HttpUtility.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Windows.Controls.Ribbon.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Windows.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Windows.Extensions.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Windows.Forms.Design.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Windows.Forms.Design.Editors.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Windows.Forms.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Windows.Forms.Primitives.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Windows.Input.Manipulations.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Windows.Presentation.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\System.Xaml.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Xml.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Xml.Linq.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Xml.ReaderWriter.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Xml.Serialization.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Xml.XDocument.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Xml.XmlDocument.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Xml.XmlSerializer.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Xml.XPath.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\ref\net8.0\System.Xml.XPath.XDocument.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\UIAutomationClient.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\UIAutomationClientSideProviders.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\UIAutomationProvider.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\UIAutomationTypes.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\unitsnet\4.145.0\lib\netstandard2.0\UnitsNet.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\WindowsBase.dll" />
<ReferencePath Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\ref\net8.0\WindowsFormsIntegration.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\microsoft.windows.sdk.net.ref\10.0.20348.31\lib\net6.0\WinRT.Runtime.dll" />
<ReferencePath Include="C:\Users\stefa\Projects\PowerToys\x64\Debug\WoxInfrastructure\Wox.Infrastructure.dll" />
<ReferencePath Include="C:\Users\stefa\Projects\PowerToys\x64\Debug\WoxPlugin\Wox.Plugin.dll" />
<ReferencePath Include="C:\Users\stefa\.nuget\packages\wpf-ui\3.0.0-preview.13\lib\net8.0-windows7.0\Wpf.Ui.dll" />
</ItemGroup>
<ItemGroup>
<Compile Include="C:\Users\stefa\Projects\PowerToys\src\modules\launcher\PowerLauncher\obj\x64\Debug\LauncherControl.g.cs" />
<Compile Include="C:\Users\stefa\Projects\PowerToys\src\modules\launcher\PowerLauncher\obj\x64\Debug\MainWindow.g.cs" />
<Compile Include="C:\Users\stefa\Projects\PowerToys\src\modules\launcher\PowerLauncher\obj\x64\Debug\ReportWindow.g.cs" />
<Compile Include="C:\Users\stefa\Projects\PowerToys\src\modules\launcher\PowerLauncher\obj\x64\Debug\ResultList.g.cs" />
<Compile Include="C:\Users\stefa\Projects\PowerToys\src\modules\launcher\PowerLauncher\obj\x64\Debug\App.g.cs" />
<Compile Include="C:\Users\stefa\Projects\PowerToys\src\modules\launcher\PowerLauncher\obj\x64\Debug\PowerToys.PowerLauncher_Content.g.cs" />
<Compile Include="C:\Users\stefa\Projects\PowerToys\src\modules\launcher\PowerLauncher\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="C:\Users\stefa\.nuget\packages\microsoft.codeanalysis.netanalyzers\8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll" />
<Analyzer Include="C:\Users\stefa\.nuget\packages\microsoft.codeanalysis.netanalyzers\8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.NetAnalyzers.dll" />
<Analyzer Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.logging.abstractions\8.0.0\analyzers\dotnet\roslyn4.4\cs\Microsoft.Extensions.Logging.Generators.dll" />
<Analyzer Include="C:\Users\stefa\.nuget\packages\microsoft.extensions.options\8.0.0\analyzers\dotnet\roslyn4.4\cs\Microsoft.Extensions.Options.SourceGeneration.dll" />
<Analyzer Include="C:\Users\stefa\.nuget\packages\microsoft.windows.cswinrt\2.0.4\analyzers\dotnet\cs\WinRT.SourceGenerator.dll" />
<Analyzer Include="C:\Users\stefa\.nuget\packages\stylecop.analyzers.unstable\1.2.0.556\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll" />
<Analyzer Include="C:\Users\stefa\.nuget\packages\stylecop.analyzers.unstable\1.2.0.556\analyzers\dotnet\cs\StyleCop.Analyzers.dll" />
<Analyzer Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\analyzers/dotnet/cs/Microsoft.Interop.ComInterfaceGenerator.dll" />
<Analyzer Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\analyzers/dotnet/cs/Microsoft.Interop.JavaScript.JSImportGenerator.dll" />
<Analyzer Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\analyzers/dotnet/cs/Microsoft.Interop.LibraryImportGenerator.dll" />
<Analyzer Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\analyzers/dotnet/cs/Microsoft.Interop.SourceGeneration.dll" />
<Analyzer Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\analyzers/dotnet/cs/System.Text.Json.SourceGeneration.dll" />
<Analyzer Include="C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\8.0.0\analyzers/dotnet/cs/System.Text.RegularExpressions.Generator.dll" />
<Analyzer Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\analyzers/dotnet/System.Windows.Forms.Analyzers.dll" />
<Analyzer Include="C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.0\analyzers/dotnet/cs/System.Windows.Forms.Analyzers.CSharp.dll" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>

View File

@@ -9,6 +9,7 @@ using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
@@ -216,6 +217,48 @@ namespace PowerLauncher.ViewModel
Hide();
}
// Check information file for version mismatch
try
{
// UserSelectedRecord
var userSelectedRecordItemData = new UserSelectedRecord();
var userSelectedRecordItemStorage = new WoxJsonStorage<UserSelectedRecord>(_userSelectedRecordStorage.GetFileName());
userSelectedRecordItemStorage.Load();
if (userSelectedRecordItemData != null)
{
if (userSelectedRecordItemStorage.CheckVersionMismatch())
{
if (!userSelectedRecordItemStorage.CheckWithInformationFileToClear(userSelectedRecordItemData))
{
userSelectedRecordItemStorage.Clear();
userSelectedRecordItemStorage.SaveInformationFile(userSelectedRecordItemData);
}
}
}
// History
var historyItemData = new QueryHistory();
var historyItemStorage = new WoxJsonStorage<QueryHistory>(_historyItemsStorage.GetFileName());
historyItemStorage.Load();
if (historyItemData != null)
{
if (historyItemStorage.CheckVersionMismatch())
{
if (!historyItemStorage.CheckWithInformationFileToClear(historyItemData))
{
historyItemStorage.Clear();
historyItemStorage.SaveInformationFile(historyItemData);
}
}
}
}
catch (JsonException e)
{
Log.Exception($"Error in Load of PluginJsonStorage: {e.Message}", e, GetType());
}
if (SelectedIsFromQueryResults())
{
_userSelectedRecord.Add(result);

View File

@@ -2,9 +2,11 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Text.Json;
using Wox.Infrastructure.Storage;
using Wox.Infrastructure.UserSettings;
using Wox.Plugin;
using Wox.Plugin.Logger;
namespace PowerLauncher.ViewModel
{
@@ -16,6 +18,27 @@ namespace PowerLauncher.ViewModel
{
_storage = new WoxJsonStorage<PowerToysRunSettings>();
Settings = _storage.Load();
// Check information file for version mismatch
try
{
PowerToysRunSettings data = new PowerToysRunSettings();
if (data != null)
{
if (_storage.CheckVersionMismatch())
{
if (!_storage.CheckWithInformationFileToClear(data))
{
_storage.Clear();
_storage.SaveInformationFile(data);
}
}
}
}
catch (JsonException e)
{
Log.Exception($"Error in Load of PowerToysRunSettings: {e.Message}", e, GetType());
}
}
public PowerToysRunSettings Settings { get; }

View File

@@ -24,9 +24,8 @@ public class Alphabet : IAlphabet
PinyinFormat.WITHOUT_TONE;
private ConcurrentDictionary<string, string[][]> _pinyinCache;
private WoxJsonStorage<Dictionary<string, string[][]>> _pinyinStorage;
private WoxJsonStorage<ConcurrentDictionary<string, string[][]>> _pinyinStorage;
private PowerToysRunSettings _settings;
private Dictionary<string, string[][]> __cache;
public void Initialize(PowerToysRunSettings settings)
{
@@ -38,8 +37,8 @@ public class Alphabet : IAlphabet
{
Stopwatch.Normal("|Wox.Infrastructure.Alphabet.Initialize|Preload pinyin cache", () =>
{
_pinyinStorage = new WoxJsonStorage<Dictionary<string, string[][]>>("Pinyin");
SetPinyinCacheAsDictionary(__cache = _pinyinStorage.Load());
_pinyinStorage = new WoxJsonStorage<ConcurrentDictionary<string, string[][]>>("Pinyin");
_pinyinCache = _pinyinStorage.Load();
// force pinyin library static constructor initialize
Pinyin4Net.GetPinyin('一', _pinyinFormat);
@@ -204,9 +203,4 @@ public class Alphabet : IAlphabet
{
return new Dictionary<string, string[][]>(_pinyinCache);
}
private void SetPinyinCacheAsDictionary(Dictionary<string, string[][]> usage)
{
_pinyinCache = new ConcurrentDictionary<string, string[][]>(usage);
}
}

View File

@@ -3,9 +3,11 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.IO.Abstractions;
using System.Linq;
using System.Text.Json;
using Wox.Plugin.Logger;
@@ -20,6 +22,8 @@ namespace Wox.Infrastructure.Storage
private static readonly IPath Path = FileSystem.Path;
private static readonly IFile File = FileSystem.File;
private readonly object _saveLock = new object();
// use property initialization instead of DefaultValueAttribute
// easier and flexible for default value of object
private static readonly JsonSerializerOptions _serializerOptions = new JsonSerializerOptions
@@ -30,6 +34,15 @@ namespace Wox.Infrastructure.Storage
WriteIndented = true,
};
private static readonly JsonSerializerOptions _informationSerializerOptions = new JsonSerializerOptions
{
DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.Never,
IncludeFields = true,
PropertyNameCaseInsensitive = true,
WriteIndented = true,
UnmappedMemberHandling = System.Text.Json.Serialization.JsonUnmappedMemberHandling.Disallow,
};
private T _data;
// need a new directory name
@@ -44,20 +57,12 @@ namespace Wox.Infrastructure.Storage
private const int _jsonStorage = 1;
private StoragePowerToysVersionInfo _storageHelper;
public T Load()
private string DefaultFileContent { get; set; }
public virtual T Load()
{
_storageHelper = new StoragePowerToysVersionInfo(FilePath, _jsonStorage);
// Depending on the version number of the previously installed PT Run, delete the cache if it is found to be incompatible
if (_storageHelper.ClearCache)
{
if (File.Exists(FilePath))
{
File.Delete(FilePath);
Log.Info($"Deleting cached data at <{FilePath}>", GetType());
}
}
if (File.Exists(FilePath))
{
var serialized = File.ReadAllText(FilePath);
@@ -122,17 +127,108 @@ namespace Wox.Infrastructure.Storage
public void Save()
{
lock (_saveLock)
{
try
{
string serialized = JsonSerializer.Serialize(_data, _serializerOptions);
File.WriteAllText(FilePath, serialized);
Log.Info($"Saving cached data at <{FilePath}>", GetType());
}
catch (IOException e)
{
Log.Exception($"Error in saving data at <{FilePath}>", e, GetType());
}
}
}
public void Clear()
{
if (File.Exists(FilePath))
{
File.Delete(FilePath);
LoadDefault();
Log.Info($"Deleting cached data at <{FilePath}>", GetType());
}
}
public void SaveInformationFile(T data)
{
lock (_saveLock)
{
DefaultFileContent = JsonSerializer.Serialize(data, _informationSerializerOptions);
_storageHelper.Close(DefaultFileContent);
}
}
public bool CheckVersionMismatch()
{
// Skip the fields check if the version hasn't changed.
// This optimization prevents unnecessary fields processing when the cache
// is already up to date, enhancing performance and reducing IO operations
if (!_storageHelper.ClearCache)
{
return false;
}
return true;
}
public bool CheckWithInformationFileToClear(T actualData)
{
var infoFilePath = _storageHelper.GetFilePath(FilePath, _jsonStorage);
if (actualData == null)
{
return false;
}
if (!File.Exists(infoFilePath))
{
DefaultFileContent = JsonSerializer.Serialize(actualData, _informationSerializerOptions);
_storageHelper.Close(DefaultFileContent);
return true;
}
try
{
string serialized = JsonSerializer.Serialize(_data, _serializerOptions);
File.WriteAllText(FilePath, serialized);
_storageHelper.Close();
var infoFileContent = File.ReadAllText(infoFilePath);
var infoFields = JsonSerializer.Deserialize<Dictionary<string, object>>(infoFileContent, _informationSerializerOptions);
Log.Info($"Saving cached data at <{FilePath}>", GetType());
if (infoFields != null && infoFields.TryGetValue("DefaultContent", out var defaultContent))
{
// Deserialize the 'DefaultContent' into the actual data type for comparison
// T defaultContentData = JsonSerializer.Deserialize<T>(defaultContent.ToString(), _informationSerializerOptions);
// Compare structures
try
{
JsonSerializer.Deserialize<T>(File.ReadAllText(FilePath), _informationSerializerOptions);
// Structures are compatible, retain the defaultContent
DefaultFileContent = defaultContent?.ToString();
}
catch (JsonException)
{
// Structures are not compatible, update with actualData
DefaultFileContent = JsonSerializer.Serialize(actualData, _informationSerializerOptions);
return false;
}
}
else
{
// DefaultContent not found or infoFields is null, update with actualData
DefaultFileContent = JsonSerializer.Serialize(actualData, _informationSerializerOptions);
}
_storageHelper.Close(DefaultFileContent);
return true;
}
catch (IOException e)
catch (JsonException e)
{
Log.Exception($"Error in saving data at <{FilePath}>", e, GetType());
Log.Exception($"Error in CheckWithInformationFileToClear at <{FilePath}>", e, GetType());
return false;
}
}
}

View File

@@ -3,7 +3,9 @@
// See the LICENSE file in the project root for more information.
using System.IO.Abstractions;
using System.Text.Json;
using Wox.Plugin;
using Wox.Plugin.Logger;
namespace Wox.Infrastructure.Storage
{
@@ -23,5 +25,33 @@ namespace Wox.Infrastructure.Storage
FilePath = Path.Combine(DirectoryPath, $"{dataType.Name}{FileSuffix}");
}
public override T Load()
{
var data = base.Load();
// Check information file for version mismatch
try
{
var informationData = new T();
if (informationData != null)
{
if (CheckVersionMismatch())
{
if (!CheckWithInformationFileToClear(informationData))
{
Clear();
SaveInformationFile(informationData);
}
}
}
}
catch (JsonException e)
{
Log.Exception($"Error in Load of PluginJsonStorage: {e.Message}", e, GetType());
}
return data.NonNull();
}
}
}

View File

@@ -5,7 +5,8 @@
using System;
using System.IO;
using System.IO.Abstractions;
using Wox.Plugin.Logger;
using System.Text.Encodings.Web;
using System.Text.Json;
namespace Wox.Infrastructure.Storage
{
@@ -21,6 +22,11 @@ namespace Wox.Infrastructure.Storage
private string FilePath { get; set; } = string.Empty;
private static readonly JsonSerializerOptions _serializerOptions = new JsonSerializerOptions
{
WriteIndented = true,
};
// As of now this information is not pertinent but may be in the future
// There may be cases when we want to delete only the .cache files and not the .json storage files
private enum StorageType
@@ -29,6 +35,13 @@ namespace Wox.Infrastructure.Storage
JSON_STORAGE = 1,
}
private class StorageObject
{
public string Version { get; set; }
public string DefaultContent { get; set; }
}
// To compare the version numbers
public static bool LessThan(string version1, string version2)
{
@@ -76,32 +89,47 @@ namespace Wox.Infrastructure.Storage
{
if (File.Exists(FilePath))
{
return File.ReadAllText(FilePath);
}
else
{
// which means it's an old version of PowerToys
string oldVersion = "v0.0.0";
return oldVersion;
if (Path.GetExtension(FilePath).Equals(".json", StringComparison.OrdinalIgnoreCase))
{
// Read and deserialize the JSON file
string json = File.ReadAllText(FilePath);
var versionObject = JsonSerializer.Deserialize<StorageObject>(json);
return versionObject?.Version ?? "v0.0.0"; // Returns "v0.0.0" if version is null
}
else if (Path.GetExtension(FilePath).Equals(".txt", StringComparison.OrdinalIgnoreCase))
{
// Read the txt file content directly
return File.ReadAllText(FilePath);
}
}
// If the file doesn't exist or is not a recognized format, assume an old version
return "v0.0.0";
}
private static string GetFilePath(string associatedFilePath, int type)
public string GetFilePath(string associatedFilePath, int type)
{
string suffix = string.Empty;
string fileType = string.Empty;
string cacheSuffix = ".cache";
string jsonSuffix = ".json";
string cacheFileType = "_version.txt";
string jsonFileType = "_information.json";
if (type == (uint)StorageType.BINARY_STORAGE)
{
suffix = cacheSuffix;
fileType = cacheFileType;
}
else if (type == (uint)StorageType.JSON_STORAGE)
{
suffix = jsonSuffix;
fileType = jsonFileType;
}
string filePath = string.Concat(associatedFilePath.AsSpan(0, associatedFilePath.Length - suffix.Length), "_version.txt");
string filePath = string.Concat(associatedFilePath.AsSpan(0, associatedFilePath.Length - suffix.Length), fileType);
return filePath;
}
@@ -123,16 +151,27 @@ namespace Wox.Infrastructure.Storage
}
}
public void Close()
public void Close(string defaultContent)
{
try
if (Path.GetExtension(FilePath).Equals(".json", StringComparison.OrdinalIgnoreCase))
{
// Update the Version file to the current version of powertoys
File.WriteAllText(FilePath, currentPowerToysVersion);
// Create an object that includes both the current version and default content
var dataToSerialize = new StorageObject
{
Version = currentPowerToysVersion,
DefaultContent = defaultContent,
};
// Serialize the StorageObject to a JSON string
string json = JsonSerializer.Serialize(dataToSerialize, _serializerOptions);
// Write the JSON string to the file
File.WriteAllText(FilePath, json);
}
catch (System.Exception e)
else if (Path.GetExtension(FilePath).Equals(".txt", StringComparison.OrdinalIgnoreCase))
{
Log.Exception($"Error in saving version at <{FilePath}>", e, GetType());
// For a txt file, just write the version as plain text
File.WriteAllText(FilePath, currentPowerToysVersion);
}
}
}

View File

@@ -12,6 +12,7 @@ namespace Wox.Infrastructure.Storage
{
private static readonly IFileSystem FileSystem = new FileSystem();
private static readonly IPath Path = FileSystem.Path;
private static string fileNameJSON;
public WoxJsonStorage()
: this(typeof(T).Name)
@@ -23,7 +24,14 @@ namespace Wox.Infrastructure.Storage
var directoryPath = Path.Combine(Constant.DataDirectory, DirectoryName);
Helper.ValidateDirectory(directoryPath);
fileNameJSON = fileName;
FilePath = Path.Combine(directoryPath, $"{fileName}{FileSuffix}");
}
public string GetFileName()
{
return fileNameJSON;
}
}
}