47 Commits

Author SHA1 Message Date
Aleh Khantsevich
832b363da7 Improved outlook online search even more and removed redundant methods from ChangeProcessor (#586) 2025-02-24 18:53:11 +01:00
Dinuru Seniya
cf8f1ecd67 Code cleanup (#585)
1.  Moved the IsBackground property assignment into the object initializer for the Thread object.

2. Replaced e.Args[e.Args.Length - 1] with e.Args[^1]

3. Added a conditional check to see if GetWindowThreadProcessId returns 0, which indicates failure. If it fails, throw a Win32Exception with the last Win32 error.

4. Removed unused assignment to the variable process

5. Changed the return type of the ConfigureServices method from IServiceProvider to ServiceProvider. It is more specific and faster.

6. Changed notifyIcon to _notifyIcon according to private var naming scheme.

7. Added the CharSet = CharSet.Unicode attribute to the DllImport declarations to specify that the string arguments should be marshaled as Unicode.
2025-02-24 09:50:44 +01:00
Burak Kaan Köse
ee5129830c Gmail crash fix. 2025-02-24 09:48:07 +01:00
Aleh Khantsevich
9facfaffa8 Improved online search performance when doing local operations (#584)
* Improved online search performance when doing local operations

* Retruning an empty list on no item searches.

* Fixed an issue with batch imap downloads.

---------

Co-authored-by: Burak Kaan Köse <bkaankose@outlook.com>
2025-02-23 22:17:40 +01:00
Burak Kaan Köse
31b859ba1a Release notes for v1.10.2 2025-02-23 20:58:33 +01:00
Burak Kaan Köse
b0f5a24c30 New Crowdin updates (#583)
* New translations resources.json (Romanian)

* New translations resources.json (French)

* New translations resources.json (Spanish)

* New translations resources.json (Catalan)

* New translations resources.json (Czech)

* New translations resources.json (Danish)

* New translations resources.json (German)

* New translations resources.json (Greek)

* New translations resources.json (Finnish)

* New translations resources.json (Italian)

* New translations resources.json (Japanese)

* New translations resources.json (Dutch)

* New translations resources.json (Polish)

* New translations resources.json (Russian)

* New translations resources.json (Turkish)

* New translations resources.json (Ukrainian)

* New translations resources.json (Chinese Simplified)

* New translations resources.json (Galician)

* New translations resources.json (Portuguese, Brazilian)

* New translations resources.json (Indonesian)

* New translations resources.json (Lithuanian)
2025-02-23 19:09:27 +01:00
Burak Kaan Köse
b60b594e44 Id -> ID in ENG translations. 2025-02-23 19:08:01 +01:00
Burak Kaan Köse
a8cee1016b Enable default accounts synchronization and timer sync for debug builds but not if it is attached. 2025-02-23 17:24:59 +01:00
Burak Kaan Köse
b551af01fa Missing archive id check for gmail synchronizer. 2025-02-23 17:16:53 +01:00
Burak Kaan Köse
b178869a8e Merge branch 'main' of https://github.com/bkaankose/Wino-Mail 2025-02-23 17:05:53 +01:00
Burak Kaan Köse
8e1c60d5f0 Gmail - Archive/Unarchive (#582)
* Disable timer back sync for debug builds.

* Archive / unarchive feature for Gmail.

* Archive folder name override for Gmail.

* Possible crash fix when the next item is being selected after a mail is removed.

* Restore proper account selection after pin/unpin of folder.

* Making sure that incorrect arcive folder id is not saved in Gmailsynchronizer due to migration.
2025-02-23 17:05:46 +01:00
Burak Kaan Köse
71ea49439e Disable timer back sync for debug builds. 2025-02-23 16:01:51 +01:00
Burak Kaan Köse
9d0a2f6535 Ignore folder filter if label specific query is passed to Gmail. 2025-02-23 10:21:58 +01:00
Burak Kaan Köse
c091fffe90 Hnadling of folder delta token 410 GONE for Outlook. 2025-02-23 00:35:13 +01:00
Burak Kaan Köse
7e05d05f94 Implemented cache reset for Gmail history id expiration. (#581) 2025-02-22 23:09:53 +01:00
Burak Kaan Köse
bd5b51c62f Added capability to detect disabled gmail service for Google Workspace accounts during account creation. (#580) 2025-02-22 17:51:38 +01:00
Burak Kaan Köse
1d5eb2eced Added simple validations for advanced imap setup dialog to prevent users from making mistakes. (#579) 2025-02-22 01:54:52 +01:00
Aleh Khantsevich
5073ead8fe Extract webvieweditor to share between compose page and signature editor (#578)
* initial work for webview editor control

* moved more stuff to editor itself

* revert packages.props indention changes

* move alignment logic

* Migrate signature editor to new control

* move background to editor control

* Some polishing

* Fixed the corner glitch issue with dark theme.

---------

Co-authored-by: Burak Kaan Köse <bkaankose@outlook.com>
2025-02-22 00:43:39 +01:00
Burak Kaan Köse
f61bcb621b Online Search (#576)
* Very basic online search for gmail.

* Server side of handling offline search and listing part in listing page.

* Default search mode implementation and search UI improvements.

* Online search for Outlook.

* Very basic online search for gmail.

* Server side of handling offline search and listing part in listing page.

* Default search mode implementation and search UI improvements.

* Online search for Outlook.

* Online search for imap without downloading the messages yet. TODO

* Completing imap search.
2025-02-22 00:22:00 +01:00
Burak Kaan Köse
42b695854b Merge branch 'main' of https://github.com/bkaankose/Wino-Mail 2025-02-20 00:54:46 +01:00
Burak Kaan Köse
496ae8b1b2 Download imap messages in ascending order. 2025-02-20 00:54:41 +01:00
Aleh Khantsevich
4215a2592f Remove last simicolon in to/cc/bcc (#574) 2025-02-18 20:51:02 +01:00
Sean Chen
bca62033a1 Log unexpected exceptions on sync failure (#569) 2025-02-16 21:15:31 +01:00
Burak Kaan Köse
18a91f9223 Fix condstore synchronization. 2025-02-16 20:40:53 +01:00
Burak Kaan Köse
474d7c7a26 New Crowdin updates (#568)
* New translations resources.json (Romanian)

* New translations resources.json (French)

* New translations resources.json (Spanish)

* New translations resources.json (Catalan)

* New translations resources.json (Czech)

* New translations resources.json (Danish)

* New translations resources.json (German)

* New translations resources.json (Greek)

* New translations resources.json (Finnish)

* New translations resources.json (Italian)

* New translations resources.json (Japanese)

* New translations resources.json (Dutch)

* New translations resources.json (Polish)

* New translations resources.json (Russian)

* New translations resources.json (Turkish)

* New translations resources.json (Ukrainian)

* New translations resources.json (Chinese Simplified)

* New translations resources.json (Galician)

* New translations resources.json (Portuguese, Brazilian)

* New translations resources.json (Indonesian)

* New translations resources.json (Lithuanian)
2025-02-16 18:13:32 +01:00
Burak Kaan Köse
3f9a51ff46 Fix portuguese - brazil typo. 2025-02-16 17:06:07 +01:00
Burak Kaan Köse
df3b5c41f9 Clicking on loaded account menu item will automatically go to Inbox. 2025-02-16 16:56:59 +01:00
Burak Kaan Köse
8800d11ab0 Lower the amount of text needed to start auto-complete in composer page to 2. 2025-02-16 16:56:42 +01:00
Burak Kaan Köse
f021834ceb Fixing diagnostic id being not saved properly. 2025-02-16 16:42:48 +01:00
Burak Kaan Köse
f54a39a549 Fix missing ; for 'you' 2025-02-16 16:33:02 +01:00
Burak Kaan Köse
c312ff3faf Ignore folders that can't be opened for IMAP. 2025-02-16 16:17:41 +01:00
Burak Kaan Köse
db833594f4 Make sure idle disconnects are not logged to app insights. 2025-02-16 16:14:50 +01:00
Burak Kaan Köse
d36cf59829 Translated dates based on display language. (#567)
* Updating the app's culture based on the display language and making sure that dates/times are properly translated.
2025-02-16 14:46:34 +01:00
Aleh Khantsevich
caae751698 Show "You" for active account in mail rendering page (#566)
* Added account contact view model to handle "You" case.

* fix namespaces again
2025-02-16 14:38:53 +01:00
Burak Kaan Köse
f7836eedce Tracking failed imap setup steps for app insights. 2025-02-16 13:23:45 +01:00
Aleh Khantsevich
3ddc1a6229 file scoped namespaces (#565) 2025-02-16 11:54:23 +01:00
Burak Kaan Köse
cf9869b71e Revert "File scoped namespaces"
This reverts commit d31d8f574e.
2025-02-16 11:43:30 +01:00
Aleh Khantsevich
d31d8f574e File scoped namespaces 2025-02-16 11:35:43 +01:00
Burak Kaan Köse
c1336428dc AppCenter to AppInsights migration. (#562)
* Remove AppCenter usage and libraries.

* Remove redundant pacakges and add the app insights sink.

* Diagnostic id support and manipulating telemetries.

* Handling of appdomain unhandled exceptions.

* Remove unused package identity package from mail project.

* Fixing printing.
2025-02-16 01:44:41 +01:00
Burak Kaan Köse
f0e513bf0d New Crowdin updates (#559)
* New translations resources.json (Romanian)

* New translations resources.json (French)

* New translations resources.json (Spanish)

* New translations resources.json (Catalan)

* New translations resources.json (Czech)

* New translations resources.json (Danish)

* New translations resources.json (German)

* New translations resources.json (Greek)

* New translations resources.json (Finnish)

* New translations resources.json (Italian)

* New translations resources.json (Japanese)

* New translations resources.json (Dutch)

* New translations resources.json (Polish)

* New translations resources.json (Russian)

* New translations resources.json (Turkish)

* New translations resources.json (Ukrainian)

* New translations resources.json (Chinese Simplified)

* New translations resources.json (Galician)

* New translations resources.json (Portuguese, Brazilian)

* New translations resources.json (Indonesian)
2025-02-15 12:55:45 +01:00
Burak Kaan Köse
ee9e41c5a7 IMAP Improvements (#558)
* Fixing an issue where scrollviewer overrides a part of template in mail list. Adjusted zoomed out header grid's corner radius.

* IDLE implementation, imap synchronization strategies basics and condstore synchronization.

* Adding iCloud and Yahoo as special IMAP handling scenario.

* iCloud special imap handling.

* Support for killing synchronizers.

* Update privacy policy url.

* Batching condstore downloads into 50, using SORT extension for searches if supported.

* Bumping some nugets. More on the imap synchronizers.

* Delegating idle synchronizations to server to post-sync operations.

* Update mailkit to resolve qresync bug with iCloud.

* Fixing remote highest mode seq checks for qresync and condstore synchronizers.

* Yahoo custom settings.

* Bump google sdk package.

* Fixing the build issue....

* NRE on canceled token accounts during setup.

* Server crash handlers.

* Remove ARM32. Upgrade server to .NET 9.

* Fix icons for yahoo and apple.

* Fixed an issue where disabled folders causing an exception on forced sync.

* Remove smtp encoding constraint.

* Remove commented code.

* Fixing merge conflict

* Addressing double registrations for mailkit remote folder events in synchronizers.

* Making sure idle canceled result is not reported.

* Fixing custom imap server dialog opening.

* Fixing the issue with account creation making the previously selected account as selected as well.

* Fixing app close behavior and logging app close.
2025-02-15 12:53:32 +01:00
Aleh Khantsevich
30f1257983 Attempt to fix source generator issues (#556)
* Changed some properties of source generator project

* Remove accelerate
2025-02-14 19:16:54 +01:00
Aleh Khantsevich
f007cef208 Updated Privacy policy URL (#557) 2025-02-14 19:15:42 +01:00
Burak Kaan Köse
19b5852098 Missing package description and fixing typo. 2025-02-14 02:14:04 +01:00
Aleh Khantsevich
2ec05ea7cc UWP .NET9 (#555)
* Ground work for NET9 UWP switch.

* Add launch settings for Wino.Mail

* Added new test WAP project

* fix platforms in slnx solution

* ManagePackageVersionsCentrally set default

* Fixing assets and couple issues with the new packaging project.

* Add back markdown

* Fix nuget warnings

* FIx error in WAP about build tools

* Add build.props with default language preview

* Some AOT compilation progress.

* More AOT stuff.

* Remove deprecated protocol auth activation handler.

* Fix remaining protocol handler for google auth.

* Even more AOT

* More more AOT fixes

* Fix a few more AOT warnings

* Fix signature editor AOT

* Fix composer and renderer AOT JSON

* Outlook Sync AOT

* Fixing bundle generation and package signing.

---------

Co-authored-by: Burak Kaan Köse <bkaankose@outlook.com>
2025-02-14 01:43:52 +01:00
Aleh Khantsevich
e8dd8bff44 Added save of drafts when closing app (#546) 2025-02-09 10:42:51 +01:00
Aleh Khantsevich
ab3f65edfa clear selection on htmlRender (#544) 2025-02-04 21:47:49 +01:00
758 changed files with 41086 additions and 39310 deletions

View File

@@ -149,7 +149,7 @@ csharp_preferred_modifier_order = public,private,protected,internal,static,exter
# Code-block preferences
csharp_prefer_braces = true:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_namespace_declarations = file_scoped:error
# Expression-level preferences
csharp_prefer_simple_default_expression = true:suggestion
@@ -288,3 +288,5 @@ csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_style_prefer_readonly_struct = true:suggestion
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
csharp_style_prefer_primary_constructors = true:silent
csharp_prefer_system_threading_lock = true:suggestion

7
Directory.Build.Props Normal file
View File

@@ -0,0 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>preview</LangVersion>
<IsAotCompatible>true</IsAotCompatible>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
</Project>

65
Directory.Packages.props Normal file
View File

@@ -0,0 +1,65 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="ColorHashSharp" Version="1.0.0" />
<PackageVersion Include="CommunityToolkit.Common" Version="8.4.0" />
<PackageVersion Include="CommunityToolkit.Diagnostics" Version="8.4.0" />
<PackageVersion Include="CommunityToolkit.Labs.Uwp.Controls.MarkdownTextBlock" Version="0.1.250206-build.2040" />
<PackageVersion Include="CommunityToolkit.Labs.Uwp.DependencyPropertyGenerator" Version="0.1.250206-build.2040" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageVersion Include="CommunityToolkit.Uwp.Animations" Version="8.2.250129-preview2" />
<PackageVersion Include="CommunityToolkit.Uwp.Behaviors" Version="8.2.250129-preview2" />
<PackageVersion Include="CommunityToolkit.Uwp.Controls.Segmented" Version="8.2.250129-preview2" />
<PackageVersion Include="CommunityToolkit.Uwp.Controls.SettingsControls" Version="8.2.250129-preview2" />
<PackageVersion Include="CommunityToolkit.Uwp.Controls.Sizers" Version="8.2.250129-preview2" />
<PackageVersion Include="CommunityToolkit.Uwp.Controls.TabbedCommandBar" Version="8.2.250129-preview2" />
<PackageVersion Include="CommunityToolkit.Uwp.Controls.TokenizingTextBox" Version="8.2.250129-preview2" />
<PackageVersion Include="CommunityToolkit.Uwp.Extensions" Version="8.2.250129-preview2" />
<PackageVersion Include="EmailValidation" Version="1.2.0" />
<PackageVersion Include="HtmlAgilityPack" Version="1.11.72" />
<PackageVersion Include="Ical.Net" Version="4.3.1" />
<PackageVersion Include="IsExternalInit" Version="1.0.3" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.2" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.2" />
<PackageVersion Include="Microsoft.Graph" Version="5.69.0" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.68.0" />
<PackageVersion Include="Microsoft.Identity.Client.Broker" Version="4.68.0" />
<PackageVersion Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.68.0" />
<PackageVersion Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.14" />
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.8.7" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Uwp.Managed" Version="3.0.0" />
<PackageVersion Include="MimeKit" Version="4.10.0" />
<PackageVersion Include="morelinq" Version="4.4.0" />
<PackageVersion Include="Nito.AsyncEx" Version="5.1.2" />
<PackageVersion Include="Nito.AsyncEx.Tasks" Version="5.1.2" />
<PackageVersion Include="NodaTime" Version="3.2.1" />
<PackageVersion Include="Serilog" Version="4.2.0" />
<PackageVersion Include="Serilog.Exceptions" Version="8.4.0" />
<PackageVersion Include="Serilog.Sinks.Debug" Version="3.0.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.ApplicationInsights" Version="4.0.0" />
<PackageVersion Include="SkiaSharp" Version="3.116.1" />
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
<PackageVersion Include="SqlKata" Version="4.0.1" />
<PackageVersion Include="System.Private.Uri" Version="4.3.2" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="9.0.2" />
<PackageVersion Include="System.Text.Json" Version="9.0.2" />
<PackageVersion Include="Win2D.uwp" Version="1.28.2" />
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.2.0" />
<PackageVersion Include="CommunityToolkit.WinUI.Notifications" Version="7.1.2" />
<PackageVersion Include="Google.Apis.Auth" Version="1.69.0" />
<PackageVersion Include="Google.Apis.Calendar.v3" Version="1.69.0.3667" />
<PackageVersion Include="Google.Apis.Gmail.v1" Version="1.68.0.3427" />
<PackageVersion Include="Google.Apis.PeopleService.v1" Version="1.68.0.3359" />
<PackageVersion Include="HtmlKit" Version="1.2.0" />
<PackageVersion Include="MailKit" Version="4.10.0" />
<PackageVersion Include="TimePeriodLibrary.NET" Version="2.1.5" />
<PackageVersion Include="System.Reactive" Version="6.0.1" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.2" />
<PackageVersion Include="System.Text.Encodings.Web" Version="9.0.2" />
</ItemGroup>
</Project>

View File

@@ -1,8 +1,8 @@
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
namespace Wino.Authentication
{
namespace Wino.Authentication;
public abstract class BaseAuthenticator
{
public abstract MailProviderType ProviderType { get; }
@@ -14,4 +14,3 @@ namespace Wino.Authentication
AuthenticatorConfig = authenticatorConfig;
}
}
}

View File

@@ -7,8 +7,8 @@ using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.Authentication;
namespace Wino.Authentication
{
namespace Wino.Authentication;
public class GmailAuthenticator : BaseAuthenticator, IGmailAuthenticator
{
public GmailAuthenticator(IAuthenticatorConfig authConfig) : base(authConfig)
@@ -48,4 +48,3 @@ namespace Wino.Authentication
}, AuthenticatorConfig.GmailScope, account.Id.ToString(), CancellationToken.None, new FileDataStore(AuthenticatorConfig.GmailTokenStoreIdentifier));
}
}
}

View File

@@ -11,8 +11,8 @@ using Wino.Core.Domain.Exceptions;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.Authentication;
namespace Wino.Authentication
{
namespace Wino.Authentication;
public class OutlookAuthenticator : BaseAuthenticator, IOutlookAuthenticator
{
private const string TokenCacheFileName = "OutlookCache.bin";
@@ -123,4 +123,3 @@ namespace Wino.Authentication
throw new AuthenticationException(Translator.Exception_UnknowErrorDuringAuthentication, new Exception(Translator.Exception_TokenGenerationFailed));
}
}
}

View File

@@ -1,24 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<RootNamespace>Wino.Authentication</RootNamespace>
<Configurations>Debug;Release</Configurations>
<LangVersion>12</LangVersion>
<Platforms>AnyCPU;x64;x86</Platforms>
<Platforms>x86;x64;arm64</Platforms>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.3.2" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.3.2" />
<PackageReference Include="Google.Apis.Auth" Version="1.68.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.66.2" />
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.66.2" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.66.2" />
<PackageReference Include="CommunityToolkit.Diagnostics" />
<PackageReference Include="CommunityToolkit.Mvvm" />
<PackageReference Include="Google.Apis.Auth" />
<PackageReference Include="Microsoft.Identity.Client" />
<PackageReference Include="Microsoft.Identity.Client.Broker" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
<ProjectReference Include="..\Wino.Messages\Wino.Messaging.csproj" />

View File

@@ -1,7 +1,7 @@
using Wino.Core.Domain.Interfaces;
namespace Wino.Calendar.Services
{
namespace Wino.Calendar.Services;
public class CalendarAuthenticatorConfig : IAuthenticatorConfig
{
public string OutlookAuthenticatorClientId => "b19c2035-d740-49ff-b297-de6ec561b208";
@@ -30,4 +30,3 @@ namespace Wino.Calendar.Services
public string GmailTokenStoreIdentifier => "WinoCalendarGmailTokenStore";
}
}

View File

@@ -0,0 +1,11 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Wino.Core.Domain;
[JsonSerializable(typeof(Dictionary<string, string>))]
[JsonSerializable(typeof(string))]
[JsonSerializable(typeof(int))]
[JsonSerializable(typeof(List<string>))]
[JsonSerializable(typeof(bool))]
public partial class BasicTypesJsonContext : JsonSerializerContext;

View File

@@ -7,8 +7,8 @@ using Wino.Core.Domain.Entities.Calendar;
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.Calendar;
namespace Wino.Core.Domain.Collections
{
namespace Wino.Core.Domain.Collections;
public class CalendarEventCollection
{
public event EventHandler<ICalendarItem> CalendarItemAdded;
@@ -153,4 +153,3 @@ namespace Wino.Core.Domain.Collections
CalendarItemsCleared?.Invoke(this, EventArgs.Empty);
}
}
}

View File

@@ -2,8 +2,8 @@
using Wino.Core.Domain.Interfaces;
using Wino.Core.Domain.Models.Calendar;
namespace Wino.Core.Domain.Collections
{
namespace Wino.Core.Domain.Collections;
public class DayRangeCollection : ObservableRangeCollection<DayRangeRenderModel>
{
/// <summary>
@@ -39,4 +39,3 @@ namespace Wino.Core.Domain.Collections
}
}
}
}

View File

@@ -4,8 +4,8 @@ using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
namespace Wino.Core.Domain.Collections
{
namespace Wino.Core.Domain.Collections;
/// <summary>
/// Represents a dynamic data collection that provides notifications when items get added, removed, or when the whole list is refreshed.
/// </summary>
@@ -171,4 +171,3 @@ namespace Wino.Core.Domain.Collections
OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, changedItems: changedItems, startingIndex: startingIndex));
}
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain
{
namespace Wino.Core.Domain;
public static class Constants
{
/// <summary>
@@ -20,4 +20,3 @@
public const string WinoMailIdentiifer = nameof(WinoMailIdentiifer);
public const string WinoCalendarIdentifier = nameof(WinoCalendarIdentifier);
}
}

View File

@@ -2,8 +2,8 @@
using SQLite;
using Wino.Core.Domain.Interfaces;
namespace Wino.Core.Domain.Entities.Calendar
{
namespace Wino.Core.Domain.Entities.Calendar;
public class AccountCalendar : IAccountCalendar
{
[PrimaryKey]
@@ -22,4 +22,3 @@ namespace Wino.Core.Domain.Entities.Calendar
public string BackgroundColorHex { get; set; }
public string TimeZone { get; set; }
}
}

View File

@@ -2,8 +2,8 @@
using SQLite;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Entities.Calendar
{
namespace Wino.Core.Domain.Entities.Calendar;
// TODO: Connect to Contact store with Wino People.
public class CalendarEventAttendee
{
@@ -17,4 +17,3 @@ namespace Wino.Core.Domain.Entities.Calendar
public bool IsOptionalAttendee { get; set; }
public string Comment { get; set; }
}
}

View File

@@ -5,8 +5,8 @@ using SQLite;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Interfaces;
namespace Wino.Core.Domain.Entities.Calendar
{
namespace Wino.Core.Domain.Entities.Calendar;
[DebuggerDisplay("{Title} ({StartDate} - {EndDate})")]
public class CalendarItem : ICalendarItem
{
@@ -177,4 +177,3 @@ namespace Wino.Core.Domain.Entities.Calendar
};
}
}
}

View File

@@ -2,8 +2,8 @@
using SQLite;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Entities.Calendar
{
namespace Wino.Core.Domain.Entities.Calendar;
public class Reminder
{
[PrimaryKey]
@@ -13,4 +13,3 @@ namespace Wino.Core.Domain.Entities.Calendar
public DateTimeOffset ReminderTime { get; set; }
public CalendarItemReminderType ReminderType { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
using System;
using SQLite;
namespace Wino.Core.Domain.Entities.Mail
{
namespace Wino.Core.Domain.Entities.Mail;
public class AccountSignature
{
[PrimaryKey]
@@ -14,4 +14,3 @@ namespace Wino.Core.Domain.Entities.Mail
public Guid MailAccountId { get; set; }
}
}

View File

@@ -1,8 +1,8 @@
using System;
using SQLite;
namespace Wino.Core.Domain.Entities.Mail
{
namespace Wino.Core.Domain.Entities.Mail;
public class RemoteAccountAlias
{
/// <summary>
@@ -60,4 +60,3 @@ namespace Wino.Core.Domain.Entities.Mail
/// </summary>
public bool CanDelete => !IsRootAlias;
}
}

View File

@@ -5,8 +5,8 @@ using Wino.Core.Domain.Entities.Shared;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.MailItem;
namespace Wino.Core.Domain.Entities.Mail
{
namespace Wino.Core.Domain.Entities.Mail;
/// <summary>
/// Summary of the parsed MIME messages.
/// Wino will do non-network operations on this table and others from the original MIME.
@@ -154,4 +154,3 @@ namespace Wino.Core.Domain.Entities.Mail
public IEnumerable<Guid> GetContainingIds() => [UniqueId];
public override string ToString() => $"{Subject} <-> {Id}";
}
}

View File

@@ -5,8 +5,8 @@ using SQLite;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.Folders;
namespace Wino.Core.Domain.Entities.Mail
{
namespace Wino.Core.Domain.Entities.Mail;
[DebuggerDisplay("{FolderName} - {SpecialFolderType}")]
public class MailItemFolder : IMailItemFolder
{
@@ -72,4 +72,3 @@ namespace Wino.Core.Domain.Entities.Mail
public override string ToString() => FolderName;
}
}

View File

@@ -1,8 +1,8 @@
using System;
using SQLite;
namespace Wino.Core.Domain.Entities.Mail
{
namespace Wino.Core.Domain.Entities.Mail;
public class MergedInbox
{
[PrimaryKey]
@@ -10,4 +10,3 @@ namespace Wino.Core.Domain.Entities.Mail
public string Name { get; set; }
}
}

View File

@@ -2,8 +2,8 @@
using System.Collections.Generic;
using SQLite;
namespace Wino.Core.Domain.Entities.Shared
{
namespace Wino.Core.Domain.Entities.Shared;
/// <summary>
/// Back storage for simple name-address book.
/// These values will be inserted during MIME fetch.
@@ -36,14 +36,6 @@ namespace Wino.Core.Domain.Entities.Shared
/// </summary>
public bool IsRootContact { get; set; }
/// <summary>
/// Short display name of the contact.
/// Eather Name or Address.
/// </summary>
public string ShortDisplayName => Address == Name || string.IsNullOrWhiteSpace(Name) ? $"{Address.ToLowerInvariant()};" : $"{Name};";
public string DisplayName => Address == Name || string.IsNullOrWhiteSpace(Name) ? Address.ToLowerInvariant() : $"{Name} <{Address.ToLowerInvariant()}>";
public override bool Equals(object obj)
{
return Equals(obj as AccountContact);
@@ -58,10 +50,7 @@ namespace Wino.Core.Domain.Entities.Shared
public override int GetHashCode()
{
int hashCode = -1717786383;
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Address);
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Name);
return hashCode;
return HashCode.Combine(Address, Name);
}
public static bool operator ==(AccountContact left, AccountContact right)
@@ -74,4 +63,3 @@ namespace Wino.Core.Domain.Entities.Shared
return !(left == right);
}
}
}

View File

@@ -1,9 +1,10 @@
using System;
using System.Collections.Generic;
using SQLite;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Entities.Shared
{
namespace Wino.Core.Domain.Entities.Shared;
public class CustomServerInformation
{
[PrimaryKey]
@@ -49,5 +50,25 @@ namespace Wino.Core.Domain.Entities.Shared
/// Default is 5.
/// </summary>
public int MaxConcurrentClients { get; set; }
public Dictionary<string, string> GetConnectionProperties()
{
// Printout the public connection properties.
var connectionProperties = new Dictionary<string, string>
{
{ "IncomingServer", IncomingServer },
{ "IncomingServerPort", IncomingServerPort },
{ "IncomingServerSocketOption", IncomingServerSocketOption.ToString() },
{ "IncomingAuthenticationMethod", IncomingAuthenticationMethod.ToString() },
{ "OutgoingServer", OutgoingServer },
{ "OutgoingServerPort", OutgoingServerPort },
{ "OutgoingServerSocketOption", OutgoingServerSocketOption.ToString() },
{ "OutgoingAuthenticationMethod", OutgoingAuthenticationMethod.ToString() },
{ "ProxyServer", ProxyServer },
{ "ProxyServerPort", ProxyServerPort }
};
return connectionProperties;
}
}

View File

@@ -3,8 +3,8 @@ using SQLite;
using Wino.Core.Domain.Entities.Mail;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Entities.Shared
{
namespace Wino.Core.Domain.Entities.Shared;
public class MailAccount
{
[PrimaryKey]
@@ -108,4 +108,3 @@ namespace Wino.Core.Domain.Entities.Shared
/// </summary>
public bool IsAliasSyncSupported => ProviderType == MailProviderType.Gmail;
}
}

View File

@@ -1,8 +1,8 @@
using System;
using SQLite;
namespace Wino.Core.Domain.Entities.Shared
{
namespace Wino.Core.Domain.Entities.Shared;
public class MailAccountPreferences
{
[PrimaryKey]
@@ -51,4 +51,3 @@ namespace Wino.Core.Domain.Entities.Shared
/// </summary>
public Guid? SignatureIdForFollowingMessages { get; set; }
}
}

View File

@@ -1,9 +1,8 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum AccountAttentionReason
{
None,
InvalidCredentials,
MissingSystemFolderConfiguration
}
}

View File

@@ -0,0 +1,7 @@
namespace Wino.Core.Domain.Enums;
public enum AccountCacheResetReason
{
AccountRemoval,
ExpiredCache
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum AccountCreationDialogState
{
Idle,
@@ -14,4 +14,3 @@
Canceled,
FetchingEvents
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
/// <summary>
/// Indicates the state of synchronizer.
/// </summary>
@@ -9,4 +9,3 @@
ExecutingRequests,
Synchronizing
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum AppLanguage
{
None,
@@ -18,4 +18,3 @@
Italian,
Romanian
}
}

View File

@@ -1,9 +1,8 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum AppThemeType
{
System,
PreDefined,
Custom,
}
}

View File

@@ -1,9 +1,8 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum ApplicationElementTheme
{
Default,
Light,
Dark
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum AttendeeStatus
{
NeedsAction,
@@ -7,4 +7,3 @@
Tentative,
Declined
}
}

View File

@@ -1,8 +1,7 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum BackgroundSynchronizationReason
{
SessionConnected,
Timer
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum CalendarDisplayType
{
Day,
@@ -8,4 +8,3 @@
Month,
Year
}
}

View File

@@ -1,8 +1,7 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum CalendarEventTargetType
{
Single, // Show details for a single event.
Series // Show the series event. Parent of all recurring events.
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
/// <summary>
/// Trigger to load more data.
/// </summary>
@@ -8,4 +8,3 @@
User,
App
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum CalendarItemRecurrenceFrequency
{
Daily,
@@ -7,4 +7,3 @@
Monthly,
Yearly
}
}

View File

@@ -1,8 +1,7 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum CalendarItemReminderType
{
Popup,
Email
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum CalendarItemStatus
{
NotResponded,
@@ -7,4 +7,3 @@
Tentative,
Cancelled,
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum CalendarItemVisibility
{
Default,
@@ -7,4 +7,3 @@
Private,
Confidential
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
/// <summary>
/// Which way in time to load more data for calendar.
/// </summary>
@@ -9,4 +9,3 @@
Previous,
Next
}
}

View File

@@ -1,8 +1,7 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum CalendarOrientation
{
Horizontal,
Vertical
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum CalendarSynchronizationType
{
ExecuteRequests, // Execute all requests in the queue.
@@ -8,4 +8,3 @@
SingleCalendar, // Sync events for only specified calendars.
UpdateProfile // Update profile information only.
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum ChangeRequestType
{
MailMarkAs,
@@ -21,4 +21,3 @@
SendDraft,
FetchSingleItem
}
}

View File

@@ -1,8 +1,7 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum CustomIncomingServerType
{
POP3,
IMAP4
}
}

View File

@@ -1,8 +1,7 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum DayHeaderDisplayType
{
TwelveHour,
TwentyFourHour,
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum DraftCreationReason
{
Empty,
@@ -7,4 +7,3 @@
ReplyAll,
Forward
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum FilterOptionType
{
All,
@@ -8,4 +8,3 @@
Mentions,
Files
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
/// <summary>
/// Defines all possible folder operations that can be done.
/// Available values for each folder is returned by IContextMenuProvider
@@ -20,4 +20,3 @@
CreateSubFolder,
Seperator
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum ImapAuthenticationMethod
{
Auto,
@@ -10,4 +10,3 @@
CramMd5,
DigestMd5
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum ImapConnectionSecurity
{
Auto,
@@ -7,4 +7,3 @@
StartTls,
SslTls
}
}

View File

@@ -1,8 +1,7 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum InfoBarAnimationType
{
SlideFromRightToLeft,
SlideFromBottomToTop
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum InfoBarMessageType
{
Information,
@@ -7,4 +7,3 @@
Warning,
Error
}
}

View File

@@ -0,0 +1,7 @@
namespace Wino.Core.Domain.Enums;
public enum InvalidMoveTargetReason
{
NonMoveTarget, // This folder does not allow moving mails.
MultipleAccounts // Multiple mails from different accounts cannot be moved.
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum MailAttachmentType
{
None,
@@ -13,4 +13,3 @@
Archive,
Other
}
}

View File

@@ -1,9 +1,8 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum MailImportance
{
Low,
Normal,
High
}
}

View File

@@ -1,9 +1,9 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum MailListDisplayMode
{
Spacious,
Medium,
Compact,
}
}

View File

@@ -1,9 +1,8 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum MailMarkAsOption
{
WhenSelected,
DontMark,
AfterDelay
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
// Synchronizer requests.
public enum MailSynchronizerOperation
{
@@ -55,4 +55,3 @@
DiscardLocalDraft,
Navigate // For toast activation
}
}

View File

@@ -1,9 +1,8 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum MailProviderType
{
Outlook,
Gmail,
IMAP4 = 4 // 2-3 were removed after release. Don't change for backward compatibility.
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum MailSynchronizationType
{
UpdateProfile, // Only update profile information
@@ -11,4 +11,3 @@
Alias, // Only update alias information
IMAPIdle // Idle client triggered synchronization.
}
}

View File

@@ -1,8 +1,7 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum NavigationReferenceFrame
{
ShellFrame,
RenderingFrame
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
/// <summary>
/// Defines the potential reasons for picking folder in the folder picking dialog.
/// </summary>
@@ -9,4 +9,3 @@
SpecialFolder,
Any
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum PrintingResult
{
Abandoned,
@@ -7,4 +7,3 @@
Failed,
Submitted
}
}

View File

@@ -0,0 +1,6 @@
namespace Wino.Core.Domain.Enums;
public enum SearchMode
{
Local,
Online
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
/// <summary>
/// What should happen to server app when the client is terminated.
/// </summary>
@@ -9,4 +9,3 @@
Invisible, // Still runs, tray icon is invisible.
Terminate // Server is terminated as Wino terminates.
}
}

View File

@@ -1,8 +1,7 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum SortingOptionType
{
ReceiveDate,
Sender
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum SpecialFolderType
{
Inbox,
@@ -21,4 +21,3 @@
Other,
More
}
}

View File

@@ -1,9 +1,8 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum SpecialImapProvider
{
None,
iCloud,
Yahoo
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum StartupBehaviorResult
{
Enabled,
@@ -8,4 +8,3 @@
DisabledByPolicy,
Fatal
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
// From the SDK.
public enum StorePurchaseResult
{
@@ -16,4 +16,3 @@
// The purchase request did not succeed.
NotPurchased,
}
}

View File

@@ -1,9 +1,8 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum SynchronizationCompletedState
{
Success, // All succeeded.
Canceled, // Canceled by user or HTTP call.
Failed // Exception.
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
/// <summary>
/// Enumeration for the source of synchronization.
/// Right now it can either be from the client or the server.
@@ -9,4 +9,3 @@
Client,
Server
}
}

View File

@@ -1,9 +1,8 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum WinoAppType
{
Unknown,
Mail,
Calendar
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum WinoCustomMessageDialogIcon
{
Information,
@@ -7,4 +7,3 @@
Error,
Question
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
/// <summary>
/// All registered views.
/// </summary>
@@ -31,4 +31,3 @@
CalendarSettingsPage,
EventDetailsPage
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Enums
{
namespace Wino.Core.Domain.Enums;
public enum WinoServerConnectionStatus
{
None,
@@ -8,4 +8,3 @@
Disconnected,
Failed
}
}

View File

@@ -1,7 +1,6 @@
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
public class AccountSetupCanceledException : System.Exception
{
}
}

View File

@@ -1,8 +1,8 @@
using System;
using Wino.Core.Domain.Entities.Shared;
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// Thrown when IAuthenticator requires user interaction to fix authentication issues.
/// It can be expired and can't restorable token, or some stuff that requires re-authentication.
@@ -16,4 +16,3 @@ namespace Wino.Core.Domain.Exceptions
public MailAccount Account { get; }
}
}

View File

@@ -1,7 +1,7 @@
using System;
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// All exceptions related to authentication.
/// </summary>
@@ -15,4 +15,3 @@ namespace Wino.Core.Domain.Exceptions
{
}
}
}

View File

@@ -1,9 +1,8 @@
using System;
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// An exception thrown when the background task registration is failed.
/// </summary>
public class BackgroundTaskRegistrationFailedException : Exception { }
}

View File

@@ -1,11 +1,10 @@
using System;
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// Thrown when composer cant find the mime to load.
/// </summary>
public class ComposerMimeNotFoundException : Exception
{
}
}

View File

@@ -1,11 +1,10 @@
using System;
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
public class CustomThemeCreationFailedException : Exception
{
public CustomThemeCreationFailedException(string message) : base(message)
{
}
}
}

View File

@@ -0,0 +1,3 @@
namespace Wino.Core.Domain.Exceptions;
public class GmailServiceDisabledException : System.Exception { }

View File

@@ -1,7 +1,6 @@
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
public class GoogleAuthenticationException : System.Exception
{
public GoogleAuthenticationException(string message) : base(message) { }
}
}

View File

@@ -1,14 +1,30 @@
using System;
using Wino.Core.Domain.Entities.Shared;
namespace Wino.Core.Domain.Exceptions;
namespace Wino.Core.Domain.Exceptions
{
public class ImapClientPoolException : Exception
{
public ImapClientPoolException()
{
}
public ImapClientPoolException(string message, CustomServerInformation customServerInformation, string protocolLog) : base(message)
{
CustomServerInformation = customServerInformation;
ProtocolLog = protocolLog;
}
public ImapClientPoolException(string message, string protocolLog) : base(message)
{
ProtocolLog = protocolLog;
}
public ImapClientPoolException(Exception innerException, string protocolLog) : base(Translator.Exception_ImapClientPoolFailed, innerException)
{
ProtocolLog = protocolLog;
}
public CustomServerInformation CustomServerInformation { get; }
public string ProtocolLog { get; }
}
}

View File

@@ -1,7 +1,7 @@
using Wino.Core.Domain.Models.AutoDiscovery;
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
public class ImapConnectionFailedPackage
{
public ImapConnectionFailedPackage(string errorMessage, string protocolLog, AutoDiscoverySettings settings)
@@ -15,4 +15,3 @@ namespace Wino.Core.Domain.Exceptions
public string ErrorMessage { get; set; }
public string ProtocolLog { get; }
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
public class ImapSynchronizerStrategyException : System.Exception
{
public ImapSynchronizerStrategyException(string message) : base(message)
@@ -7,4 +7,3 @@
}
}
}

View File

@@ -1,5 +1,5 @@
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
public class ImapTestSSLCertificateException : System.Exception
{
public ImapTestSSLCertificateException(string issuer, string expirationDateString, string validFromDateString)
@@ -14,4 +14,3 @@
public string ValidFromDateString { get; set; }
}
}

View File

@@ -1,6 +1,9 @@
using System;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Core.Domain.Exceptions;
public class InvalidMoveTargetException(InvalidMoveTargetReason reason) : Exception
{
public class InvalidMoveTargetException : Exception { }
public InvalidMoveTargetReason Reason { get; } = reason;
}

View File

@@ -1,7 +1,6 @@
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
public class MissingAliasException : System.Exception
{
public MissingAliasException() : base(Translator.Exception_MissingAlias) { }
}
}

View File

@@ -1,11 +1,10 @@
using System;
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
public class SynchronizerEntityNotFoundException : Exception
{
public SynchronizerEntityNotFoundException(string message) : base(message)
{
}
}
}

View File

@@ -1,7 +1,7 @@
using System;
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
public class SynchronizerException : Exception
{
public SynchronizerException(string message) : base(message)
@@ -12,4 +12,3 @@ namespace Wino.Core.Domain.Exceptions
{
}
}
}

View File

@@ -1,7 +1,6 @@
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// When IMAP account's system folder configuration setup is not done yet.
/// </summary>
public class SystemFolderConfigurationMissingException : System.Exception { }
}

View File

@@ -1,8 +1,8 @@
using System;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// Emitted when special folder is needed for an operation but it couldn't be found.
/// </summary>
@@ -17,4 +17,3 @@ namespace Wino.Core.Domain.Exceptions
public SpecialFolderType SpecialFolderType { get; }
public Guid AccountId { get; set; }
}
}

View File

@@ -1,7 +1,7 @@
using System;
namespace Wino.Core.Domain.Exceptions
{
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// All server crash types. Wino Server ideally should not throw anything else than this Exception type.
/// </summary>
@@ -9,4 +9,3 @@ namespace Wino.Core.Domain.Exceptions
{
public WinoServerException(string message) : base(message) { }
}
}

View File

@@ -1,8 +1,8 @@
using System;
using Wino.Core.Domain.Models.Calendar;
namespace Wino.Core.Domain.Extensions
{
namespace Wino.Core.Domain.Extensions;
public static class DateTimeExtensions
{
/// <summary>
@@ -30,4 +30,3 @@ namespace Wino.Core.Domain.Extensions
return date.AddDays(-diff).Date;
}
}
}

View File

@@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
namespace Wino.Core.Domain.Extensions
{
namespace Wino.Core.Domain.Extensions;
public static class ExceptionExtensions
{
public static IEnumerable<Exception> GetInnerExceptions(this Exception ex)
@@ -21,4 +21,3 @@ namespace Wino.Core.Domain.Extensions
while (innerException != null);
}
}
}

Some files were not shown because too many files have changed in this diff Show More