Cleaning up the solution. Separating Shared.WinRT, Services and Synchronization. Removing synchronization from app. Reducing bundle size by 45mb.
This commit is contained in:
@@ -5,10 +5,10 @@ using System.Windows;
|
||||
using H.NotifyIcon;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Windows.Storage;
|
||||
using Wino.Core;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Services;
|
||||
using Wino.Core.UWP;
|
||||
using Wino.Domain;
|
||||
using Wino.Domain.Interfaces;
|
||||
using Wino.Services;
|
||||
using Wino.Synchronization;
|
||||
//using Wino.Core.UWP;
|
||||
|
||||
namespace Wino.Server
|
||||
@@ -41,15 +41,8 @@ namespace Wino.Server
|
||||
services.AddTransient<ServerContext>();
|
||||
services.AddTransient<ServerViewModel>();
|
||||
|
||||
services.RegisterCoreServices();
|
||||
services.RegisterCoreUWPServices();
|
||||
|
||||
// Below services belongs to UWP.Core package and some APIs are not available for WPF.
|
||||
// We register them here to avoid compilation errors.
|
||||
|
||||
//services.AddSingleton<IConfigurationService, ConfigurationService>();
|
||||
//services.AddSingleton<INativeAppService, NativeAppService>();
|
||||
//services.AddSingleton<IPreferencesService, PreferencesService>();
|
||||
services.RegisterSynchronizationServices();
|
||||
services.RegisterServices();
|
||||
|
||||
return services.BuildServiceProvider();
|
||||
}
|
||||
@@ -62,7 +55,7 @@ namespace Wino.Server
|
||||
var applicationFolderConfiguration = Services.GetService<IApplicationConfiguration>();
|
||||
|
||||
applicationFolderConfiguration.ApplicationDataFolderPath = ApplicationData.Current.LocalFolder.Path;
|
||||
applicationFolderConfiguration.PublisherSharedFolderPath = ApplicationData.Current.GetPublisherCacheFolder(ApplicationConfiguration.SharedFolderName).Path;
|
||||
applicationFolderConfiguration.PublisherSharedFolderPath = ApplicationData.Current.GetPublisherCacheFolder(Constants.SharedFolderName).Path;
|
||||
|
||||
await databaseService.InitializeAsync();
|
||||
|
||||
|
||||
@@ -8,15 +8,14 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.AppService;
|
||||
using Windows.Foundation.Collections;
|
||||
using Wino.Core.Authenticators;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Synchronization;
|
||||
using Wino.Core.Integration.Processors;
|
||||
using Wino.Core.Services;
|
||||
using Wino.Domain.Models.Synchronization;
|
||||
using Wino.Core.Synchronizers;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Interfaces;
|
||||
using Wino.Messaging;
|
||||
using Wino.Messaging.Enums;
|
||||
using Wino.Messaging.Server;
|
||||
using Wino.Services.Authenticators;
|
||||
|
||||
namespace Wino.Server
|
||||
{
|
||||
@@ -120,7 +119,7 @@ namespace Wino.Server
|
||||
var options = new SynchronizationOptions()
|
||||
{
|
||||
AccountId = acc.Id,
|
||||
Type = Core.Domain.Enums.SynchronizationType.Full
|
||||
Type = SynchronizationType.Full
|
||||
};
|
||||
|
||||
var result = await sync.SynchronizeAsync(options);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Windows;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Server
|
||||
{
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<RootNamespace>Wino.Server.WinUI</RootNamespace>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<Platforms>x86;x64;ARM64</Platforms>
|
||||
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) >= 8">win-x86;win-x64;win-arm64</RuntimeIdentifiers>
|
||||
<RuntimeIdentifiers Condition="$([MSBuild]::GetTargetFrameworkVersion('$(TargetFramework)')) < 8">win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
|
||||
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
|
||||
<UseWinUI>true</UseWinUI>
|
||||
<EnableMsixTooling>true</EnableMsixTooling>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>Wino.Server.App</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Images\Wino_Icon.ico" />
|
||||
<None Remove="TrayIconResources.xaml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Wino.Core.UWP\Services\ConfigurationService.cs" Link="Services\ConfigurationService.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\NativeAppService.cs" Link="Services\NativeAppService.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\NotificationBuilder.cs" Link="Services\NotificationBuilder.cs" />
|
||||
<Compile Include="..\Wino.Core.UWP\Services\PreferencesService.cs" Link="Services\PreferencesService.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Wino_Icon.ico">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
||||
<PackageReference Include="H.NotifyIcon.WinUI" Version="2.1.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.NET8.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core\Wino.Core.NET8.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.NET8.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Services\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Update="TrayIconResources.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -27,9 +27,9 @@
|
||||
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.1.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.NET8.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.UWP\Wino.Core.WinUI.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core\Wino.Core.NET8.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.NET8.csproj" />
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Domain.csproj" />
|
||||
<ProjectReference Include="..\Wino.Messaging\Wino.Messaging.csproj" />
|
||||
<ProjectReference Include="..\Wino.Shared.WinRT\Wino.Shared.WinRT.csproj" />
|
||||
<ProjectReference Include="..\Wino.Synchronization\Wino.Synchronization.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user