Full trust Wino Server implementation. (#295)
* Separation of messages. Introducing Wino.Messages library. * Wino.Server and Wino.Packaging projects. Enabling full trust for UWP and app service connection manager basics. * Remove debug code. * Enable generating assembly info to deal with unsupported os platform warnings. * Fix server-client connection. * UIMessage communication. Single instancing for server and re-connection mechanism on suspension. * Removed IWinoSynchronizerFactory from UWP project. * Removal of background task service from core. * Delegating changes to UI and triggering new background synchronization. * Fix build error. * Moved core lib messages to Messaging project. * Better client-server communication. Handling of requests in the server. New synchronizer factory in the server. * WAM broker and MSAL token caching for OutlookAuthenticator. Handling account creation for Outlook. * WinoServerResponse basics. * Delegating protocol activation for Gmail authenticator. * Adding margin to searchbox to match action bar width. * Move libraries into lib folder. * Storing base64 encoded mime on draft creation instead of MimeMessage object. Fixes serialization/deserialization issue with S.T.Json * Scrollbar adjustments * WınoExpander for thread expander layout ıssue. * Handling synchronizer state changes. * Double init on background activation. * FIxing packaging issues and new Wino Mail launcher protocol for activation from full thrust process. * Remove debug deserialization. * Remove debug code. * Making sure the server connection is established when the app is launched. * Thrust -> Trust string replacement... * Rename package to Wino Mail * Enable translated values in the server. * Fixed an issue where toast activation can't find the clicked mail after the folder is initialized. * Revert debug code. * Change server background sync to every 3 minute and Inbox only synchronization. * Revert google auth changes. * App preferences page. * Changing tray icon visibility on preference change. * Start the server with invisible tray icon if set to invisible. * Reconnect button on the title bar. * Handling of toast actions. * Enable x86 build for server during packaging. * Get rid of old background tasks and v180 migration. * Terminate client when Exit clicked in server. * Introducing SynchronizationSource to prevent notifying UI after server tick synchronization. * Remove confirmAppClose restricted capability and unused debug code in manifest. * Closing the reconnect info popup when reconnect is clicked. * Custom RetryHandler for OutlookSynchronizer and separating client/server logs. * Running server on Windows startup. * Fix startup exe. * Fix for expander list view item paddings. * Force full sync on app launch instead of Inbox. * Fix draft creation. * Fix an issue with custom folder sync logic. * Reporting back account sync progress from server. * Fix sending drafts and missing notifications for imap. * Changing imap folder sync requirements. * Retain file count is set to 3. * Disabled swipe gestures temporarily due to native crash with SwipeControl * Save all attachments implementation. * Localization for save all attachments button. * Fix logging dates for logs. * Fixing ARM64 build. * Add ARM64 build config to packaging project. * Comment out OutOfProcPDB for ARM64. * Hnadling GONE response for Outlook folder synchronization.
This commit is contained in:
14
Wino.Messages/Client/Accounts/AccountMenuItemExtended.cs
Normal file
14
Wino.Messages/Client/Accounts/AccountMenuItemExtended.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Messaging.Client.Accounts
|
||||
{
|
||||
/// <summary>
|
||||
/// When menu item for the account is requested to be extended.
|
||||
/// Additional properties are also supported to navigate to correct IMailItem.
|
||||
/// </summary>
|
||||
/// <param name="AutoSelectAccount">Account to extend menu item for.</param>
|
||||
/// <param name="FolderId">Folder to select after expansion.</param>
|
||||
/// <param name="NavigateMailItem">Mail item to select if possible in the expanded folder.</param>
|
||||
public record AccountMenuItemExtended(Guid FolderId, IMailItem NavigateMailItem);
|
||||
}
|
||||
11
Wino.Messages/Client/Accounts/AccountMenuItemsReordered.cs
Normal file
11
Wino.Messages/Client/Accounts/AccountMenuItemsReordered.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wino.Messaging.Client.Accounts
|
||||
{
|
||||
/// <summary>
|
||||
/// Emitted when account menu items are reordered.
|
||||
/// </summary>
|
||||
/// <param name="newOrderDictionary">New order info.</param>
|
||||
public record AccountMenuItemsReordered(Dictionary<Guid, int> newOrderDictionary);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Accounts
|
||||
{
|
||||
/// <summary>
|
||||
/// When a full menu refresh for accounts menu is requested.
|
||||
/// </summary>
|
||||
public record AccountsMenuRefreshRequested(bool AutomaticallyNavigateFirstItem = true);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Messaging.Client.Authorization
|
||||
{
|
||||
/// <summary>
|
||||
/// When Google authentication makes a callback to the app via protocol activation to the app.
|
||||
/// App will send this message back to server to continue authorization there.
|
||||
/// </summary>
|
||||
/// <param name="AuthorizationResponseUri">Callback Uri that Google returned.</param>
|
||||
public record ProtocolAuthorizationCallbackReceived(Uri AuthorizationResponseUri) : IClientMessage;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Connection
|
||||
{
|
||||
/// <summary>
|
||||
/// When client established a healthy connection to the server.
|
||||
/// </summary>
|
||||
public record WinoServerConnectionEstrablished;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When rendered html is requested to cancel.
|
||||
/// </summary>
|
||||
public record CancelRenderingContentRequested;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When reset all mail selections requested.
|
||||
/// </summary>
|
||||
public record ClearMailSelectionsRequested;
|
||||
}
|
||||
10
Wino.Messages/Client/Mails/CreateNewComposeMailRequested.cs
Normal file
10
Wino.Messages/Client/Mails/CreateNewComposeMailRequested.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When a new composing requested.
|
||||
/// </summary>
|
||||
/// <param name="RenderModel"></param>
|
||||
public record CreateNewComposeMailRequested(MailRenderModel RenderModel);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When rendering frame should be disposed.
|
||||
/// </summary>
|
||||
public class DisposeRenderingFrameRequested { }
|
||||
}
|
||||
8
Wino.Messages/Client/Mails/HtmlRenderingRequested.cs
Normal file
8
Wino.Messages/Client/Mails/HtmlRenderingRequested.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When existing a new html is requested to be rendered due to mail selection or signature.
|
||||
/// </summary>
|
||||
/// <param name="HtmlBody">HTML to render in WebView2.</param>
|
||||
public record HtmlRenderingRequested(string HtmlBody);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When IMAP setup dialog requestes back breadcrumb navigation.
|
||||
/// Not providing PageType will go back to previous page by doing back navigation.
|
||||
/// </summary>
|
||||
/// <param name="PageType">Type to go back.</param>
|
||||
/// <param name="Parameter">Back parameters.</param>
|
||||
public record ImapSetupBackNavigationRequested(Type PageType = null, object Parameter = null);
|
||||
}
|
||||
10
Wino.Messages/Client/Mails/ImapSetupDismissRequested.cs
Normal file
10
Wino.Messages/Client/Mails/ImapSetupDismissRequested.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When user asked to dismiss IMAP setup dialog.
|
||||
/// </summary>
|
||||
/// <param name="CompletedServerInformation"> Validated server information that is ready to be saved to database. </param>
|
||||
public record ImapSetupDismissRequested(CustomServerInformation CompletedServerInformation = null);
|
||||
}
|
||||
11
Wino.Messages/Client/Mails/ImapSetupNavigationRequested.cs
Normal file
11
Wino.Messages/Client/Mails/ImapSetupNavigationRequested.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When IMAP setup dialog breadcrumb navigation requested.
|
||||
/// </summary>
|
||||
/// <param name="PageType">Page type to navigate.</param>
|
||||
/// <param name="Parameter">Navigation parameters.</param>
|
||||
public record ImapSetupNavigationRequested(Type PageType, object Parameter);
|
||||
}
|
||||
11
Wino.Messages/Client/Mails/MailItemNavigationRequested.cs
Normal file
11
Wino.Messages/Client/Mails/MailItemNavigationRequested.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When a IMailItem needs to be navigated (or selected)
|
||||
/// </summary>
|
||||
/// <param name="UniqueMailId">UniqueId of the mail to navigate.</param>
|
||||
/// <param name="ScrollToItem">Whether navigated item should be scrolled to or not..</param>
|
||||
public record MailItemNavigationRequested(Guid UniqueMailId, bool ScrollToItem = false);
|
||||
}
|
||||
17
Wino.Messages/Client/Mails/NavigateMailFolderEvent.cs
Normal file
17
Wino.Messages/Client/Mails/NavigateMailFolderEvent.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Navigation;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// Selects the given FolderMenuItem in the shell folders list.
|
||||
/// </summary>
|
||||
public class NavigateMailFolderEvent : NavigateMailFolderEventArgs
|
||||
{
|
||||
public NavigateMailFolderEvent(IBaseFolderMenuItem baseFolderMenuItem, TaskCompletionSource<bool> folderInitLoadAwaitTask = null)
|
||||
: base(baseFolderMenuItem, folderInitLoadAwaitTask)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Wino.Messages/Client/Mails/SaveAsPDFRequested.cs
Normal file
11
Wino.Messages/Client/Mails/SaveAsPDFRequested.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When mail save as PDF requested.
|
||||
/// </summary>
|
||||
public record SaveAsPDFRequested(string FileSavePath);
|
||||
}
|
||||
8
Wino.Messages/Client/Mails/SelectedMailItemsChanged.cs
Normal file
8
Wino.Messages/Client/Mails/SelectedMailItemsChanged.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When selected mail count is changed.
|
||||
/// </summary>
|
||||
/// <param name="SelectedItemCount">New selected mail count.</param>
|
||||
public record SelectedMailItemsChanged(int SelectedItemCount);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Navigation
|
||||
{
|
||||
/// <summary>
|
||||
/// When back navigation is requested for breadcrumb pages.
|
||||
/// </summary>
|
||||
public record BackBreadcrumNavigationRequested { }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Messaging.Client.Navigation
|
||||
{
|
||||
/// <summary>
|
||||
/// When Breadcrumb control navigation requested.
|
||||
/// </summary>
|
||||
/// <param name="PageTitle">Title to display for the page.</param>
|
||||
/// <param name="PageType">Enum equilavent of the page to navigate.</param>
|
||||
/// <param name="Parameter">Additional parameters to the page.</param>
|
||||
public record BreadcrumbNavigationRequested(string PageTitle, WinoPage PageType, object Parameter = null);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Navigation
|
||||
{
|
||||
/// <summary>
|
||||
/// Navigates to settings page.
|
||||
/// </summary>
|
||||
public record NavigateSettingsRequested;
|
||||
}
|
||||
8
Wino.Messages/Client/Shell/ApplicationThemeChanged.cs
Normal file
8
Wino.Messages/Client/Shell/ApplicationThemeChanged.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// When the application theme changed.
|
||||
/// </summary>
|
||||
/// <param name="IsUnderlyingThemeDark"></param>
|
||||
public record ApplicationThemeChanged(bool IsUnderlyingThemeDark);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// When
|
||||
/// - There is no selection of any folder for any account
|
||||
/// - Multiple accounts exists
|
||||
/// - User clicked 'Create New Mail'
|
||||
///
|
||||
/// flyout must be presented to pick correct account.
|
||||
/// This message will be picked up by UWP Shell.
|
||||
/// </summary>
|
||||
public record CreateNewMailWithMultipleAccountsRequested(IEnumerable<MailAccount> AllAccounts);
|
||||
}
|
||||
17
Wino.Messages/Client/Shell/InfoBarMessageRequested.cs
Normal file
17
Wino.Messages/Client/Shell/InfoBarMessageRequested.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// For displaying right sliding notification message in shell.
|
||||
/// </summary>
|
||||
/// <param name="Severity">Severity of notification.</param>
|
||||
/// <param name="Title">Title of the message.</param>
|
||||
/// <param name="Message">Message content.</param>
|
||||
public record InfoBarMessageRequested(InfoBarMessageType Severity,
|
||||
string Title,
|
||||
string Message,
|
||||
string ActionButtonTitle = "",
|
||||
Action Action = null);
|
||||
}
|
||||
7
Wino.Messages/Client/Shell/LanguageChanged.cs
Normal file
7
Wino.Messages/Client/Shell/LanguageChanged.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// When application language is updated.
|
||||
/// </summary>
|
||||
public record LanguageChanged;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
public class MailtoProtocolMessageRequested { }
|
||||
}
|
||||
10
Wino.Messages/Client/Shell/NavigationPaneModeChanged.cs
Normal file
10
Wino.Messages/Client/Shell/NavigationPaneModeChanged.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// When navigation pane mode is changed.
|
||||
/// </summary>
|
||||
/// <param name="NewMode">New navigation mode.</param>
|
||||
public record NavigationPaneModeChanged(MenuPaneMode NewMode);
|
||||
}
|
||||
7
Wino.Messages/Client/Shell/ShellStateUpdated.cs
Normal file
7
Wino.Messages/Client/Shell/ShellStateUpdated.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// When reading mail state or reader pane narrowed state is changed.
|
||||
/// </summary>
|
||||
public record ShellStateUpdated;
|
||||
}
|
||||
8
Wino.Messages/Enums/MessageType.cs
Normal file
8
Wino.Messages/Enums/MessageType.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Wino.Messaging.Enums
|
||||
{
|
||||
public enum MessageType
|
||||
{
|
||||
UIMessage, // For database changes that needs to be reflected in the UI. Either client sends it to itself or server sends it to client.
|
||||
ServerMessage, // For all actions that UWP awaits a response from Server. Caller is awaited, response returned in the app service connection args.
|
||||
}
|
||||
}
|
||||
10
Wino.Messages/MessageConstants.cs
Normal file
10
Wino.Messages/MessageConstants.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Wino.Messaging
|
||||
{
|
||||
public static class MessageConstants
|
||||
{
|
||||
public const string MessageTypeKey = nameof(MessageTypeKey);
|
||||
public const string MessageDataKey = nameof(MessageDataKey);
|
||||
public const string MessageDataTypeKey = nameof(MessageDataTypeKey);
|
||||
public const string MessageDataRequestAccountIdKey = nameof(MessageDataRequestAccountIdKey);
|
||||
}
|
||||
}
|
||||
11
Wino.Messages/Server/AuthorizationRequested.cs
Normal file
11
Wino.Messages/Server/AuthorizationRequested.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Messaging.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// For delegating authentication/authorization to the server app.
|
||||
/// </summary>
|
||||
public record AuthorizationRequested(MailProviderType MailProviderType, MailAccount CreatedAccount) : IClientMessage;
|
||||
}
|
||||
14
Wino.Messages/Server/DownloadMissingMessageRequested.cs
Normal file
14
Wino.Messages/Server/DownloadMissingMessageRequested.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Messaging.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Message to download a missing message.
|
||||
/// Sent from client to server.
|
||||
/// </summary>
|
||||
/// <param name="AccountId">Account id for corresponding synchronizer.</param>
|
||||
/// <param name="MailCopyId">Mail copy id to download.</param>
|
||||
public record DownloadMissingMessageRequested(Guid AccountId, IMailItem MailItem) : IClientMessage;
|
||||
}
|
||||
12
Wino.Messages/Server/NewSynchronizationRequested.cs
Normal file
12
Wino.Messages/Server/NewSynchronizationRequested.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Synchronization;
|
||||
|
||||
namespace Wino.Messaging.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Triggers a new synchronization if possible.
|
||||
/// </summary>
|
||||
/// <param name="Options">Options for synchronization.</param>
|
||||
public record NewSynchronizationRequested(SynchronizationOptions Options, SynchronizationSource Source) : IClientMessage;
|
||||
}
|
||||
11
Wino.Messages/Server/ServerTerminationModeChanged.cs
Normal file
11
Wino.Messages/Server/ServerTerminationModeChanged.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Messaging.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// App close behavior for server is changed.
|
||||
/// </summary>
|
||||
/// <param name="ServerBackgroundMode">New server background mode.</param>
|
||||
public record ServerTerminationModeChanged(ServerBackgroundMode ServerBackgroundMode) : IClientMessage;
|
||||
}
|
||||
11
Wino.Messages/Server/SynchronizationExistenceCheckRequest.cs
Normal file
11
Wino.Messages/Server/SynchronizationExistenceCheckRequest.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Core.Domain.Models.Synchronization
|
||||
{
|
||||
/// <summary>
|
||||
/// Client request to server to check whether given account id is in the middle of synchronization.
|
||||
/// </summary>
|
||||
/// <param name="AccountId">Account id to check sync existence for.</param>
|
||||
public record SynchronizationExistenceCheckRequest(Guid AccountId) : IClientMessage;
|
||||
}
|
||||
6
Wino.Messages/UI/AccountCreatedMessage.cs
Normal file
6
Wino.Messages/UI/AccountCreatedMessage.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record AccountCreatedMessage(MailAccount Account) : UIMessageBase<AccountCreatedMessage>;
|
||||
}
|
||||
6
Wino.Messages/UI/AccountRemovedMessage.cs
Normal file
6
Wino.Messages/UI/AccountRemovedMessage.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record AccountRemovedMessage(MailAccount Account) : UIMessageBase<AccountRemovedMessage>;
|
||||
}
|
||||
8
Wino.Messages/UI/AccountSynchronizationCompleted.cs
Normal file
8
Wino.Messages/UI/AccountSynchronizationCompleted.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record AccountSynchronizationCompleted(Guid AccountId, SynchronizationCompletedState Result, Guid? SynchronizationTrackingId)
|
||||
: UIMessageBase<AccountSynchronizationCompleted>;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Reports back the account synchronization progress.
|
||||
/// </summary>
|
||||
public record AccountSynchronizationProgressUpdatedMessage(Guid AccountId, double Progress) : UIMessageBase<AccountSynchronizationProgressUpdatedMessage>;
|
||||
}
|
||||
12
Wino.Messages/UI/AccountSynchronizerStateChanged.cs
Normal file
12
Wino.Messages/UI/AccountSynchronizerStateChanged.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Emitted when synchronizer state is updated.
|
||||
/// </summary>
|
||||
/// <param name="synchronizer">Account Synchronizer</param>
|
||||
/// <param name="newState">New state.</param>
|
||||
public record AccountSynchronizerStateChanged(Guid AccountId, AccountSynchronizerState NewState) : UIMessageBase<AccountSynchronizerStateChanged>;
|
||||
}
|
||||
6
Wino.Messages/UI/AccountUpdatedMessage.cs
Normal file
6
Wino.Messages/UI/AccountUpdatedMessage.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record AccountUpdatedMessage(MailAccount Account) : UIMessageBase<AccountUpdatedMessage>;
|
||||
}
|
||||
6
Wino.Messages/UI/DraftCreated.cs
Normal file
6
Wino.Messages/UI/DraftCreated.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record DraftCreated(MailCopy DraftMail, MailAccount Account) : UIMessageBase<DraftCreated>;
|
||||
}
|
||||
6
Wino.Messages/UI/DraftFailed.cs
Normal file
6
Wino.Messages/UI/DraftFailed.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record DraftFailed(MailCopy DraftMail, MailAccount Account) : UIMessageBase<DraftFailed>;
|
||||
}
|
||||
4
Wino.Messages/UI/DraftMapped.cs
Normal file
4
Wino.Messages/UI/DraftMapped.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record DraftMapped(string LocalDraftCopyId, string RemoteDraftCopyId) : UIMessageBase<DraftMapped>;
|
||||
}
|
||||
6
Wino.Messages/UI/FolderRenamed.cs
Normal file
6
Wino.Messages/UI/FolderRenamed.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record FolderRenamed(IMailItemFolder MailItemFolder) : UIMessageBase<FolderRenamed>;
|
||||
}
|
||||
6
Wino.Messages/UI/FolderSynchronizationEnabled.cs
Normal file
6
Wino.Messages/UI/FolderSynchronizationEnabled.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record FolderSynchronizationEnabled(IMailItemFolder MailItemFolder) : UIMessageBase<FolderSynchronizationEnabled>;
|
||||
}
|
||||
6
Wino.Messages/UI/MailAddedMessage.cs
Normal file
6
Wino.Messages/UI/MailAddedMessage.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record MailAddedMessage(MailCopy AddedMail) : UIMessageBase<MailAddedMessage>;
|
||||
}
|
||||
6
Wino.Messages/UI/MailDownloadedMessage.cs
Normal file
6
Wino.Messages/UI/MailDownloadedMessage.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record MailDownloadedMessage(MailCopy DownloadedMail) : UIMessageBase<MailDownloadedMessage>;
|
||||
}
|
||||
6
Wino.Messages/UI/MailRemovedMessage.cs
Normal file
6
Wino.Messages/UI/MailRemovedMessage.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record MailRemovedMessage(MailCopy RemovedMail) : UIMessageBase<MailRemovedMessage>;
|
||||
}
|
||||
6
Wino.Messages/UI/MailUpdatedMessage.cs
Normal file
6
Wino.Messages/UI/MailUpdatedMessage.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record MailUpdatedMessage(MailCopy UpdatedMail) : UIMessageBase<MailUpdatedMessage>;
|
||||
}
|
||||
6
Wino.Messages/UI/MergedInboxRenamed.cs
Normal file
6
Wino.Messages/UI/MergedInboxRenamed.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record MergedInboxRenamed(Guid MergedInboxId, string NewName) : UIMessageBase<MergedInboxRenamed>;
|
||||
}
|
||||
7
Wino.Messages/UI/RefreshUnreadCountsMessage.cs
Normal file
7
Wino.Messages/UI/RefreshUnreadCountsMessage.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record RefreshUnreadCountsMessage(Guid AccountId) : IUIMessage;
|
||||
}
|
||||
6
Wino.Messages/UI/UIMessageBase.cs
Normal file
6
Wino.Messages/UI/UIMessageBase.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Messaging.UI
|
||||
{
|
||||
public record UIMessageBase<T> : IUIMessage { }
|
||||
}
|
||||
21
Wino.Messages/Wino.Messaging.csproj
Normal file
21
Wino.Messages/Wino.Messaging.csproj
Normal file
@@ -0,0 +1,21 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>12</LangVersion>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="IsExternalInit" Version="1.0.3">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Text.Json" Version="8.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user