From 495885e0069c4b3722740b8cf37af39e39097cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Sun, 21 Jul 2024 05:45:02 +0200 Subject: [PATCH] Cleaning up the solution. Separating Shared.WinRT, Services and Synchronization. Removing synchronization from app. Reducing bundle size by 45mb. --- Wino.Core.Domain/Constants.cs | 31 ++- Wino.Core.Domain/Entities/AccountSignature.cs | 2 +- .../Entities/AddressInformation.cs | 2 +- .../Entities/CustomServerInformation.cs | 4 +- Wino.Core.Domain/Entities/MailAccount.cs | 4 +- .../Entities/MailAccountPreferences.cs | 2 +- Wino.Core.Domain/Entities/MailCopy.cs | 6 +- Wino.Core.Domain/Entities/MailItemFolder.cs | 7 +- Wino.Core.Domain/Entities/MergedInbox.cs | 2 +- .../Entities/SystemFolderConfiguration.cs | 2 +- Wino.Core.Domain/Entities/TokenInformation.cs | 4 +- .../Enums/AccountAttentionReason.cs | 2 +- .../Enums/AccountCreationDialogState.cs | 2 +- .../Enums/AccountSynchronizerState.cs | 2 +- Wino.Core.Domain/Enums/AppLanguage.cs | 2 +- Wino.Core.Domain/Enums/AppThemeType.cs | 2 +- .../Enums/ApplicationElementTheme.cs | 2 +- .../Enums/BackgroundSynchronizationReason.cs | 2 +- Wino.Core.Domain/Enums/ChangeRequestType.cs | 2 +- .../Enums/CustomIncomingServerType.cs | 2 +- Wino.Core.Domain/Enums/DraftCreationReason.cs | 2 +- .../Enums/EditorToolbarSectionType.cs | 2 +- Wino.Core.Domain/Enums/FilterOptionType.cs | 2 +- Wino.Core.Domain/Enums/FolderOperation.cs | 2 +- .../Enums/ImapAuthenticationMethod.cs | 2 +- .../Enums/ImapConnectionSecurity.cs | 2 +- .../Enums/InfoBarAnimationType.cs | 2 +- Wino.Core.Domain/Enums/InfoBarMessageType.cs | 2 +- Wino.Core.Domain/Enums/MailAttachmentType.cs | 2 +- Wino.Core.Domain/Enums/MailImportance.cs | 2 +- Wino.Core.Domain/Enums/MailListDisplayMode.cs | 2 +- Wino.Core.Domain/Enums/MailMarkAsOption.cs | 2 +- Wino.Core.Domain/Enums/MailOperation.cs | 2 +- Wino.Core.Domain/Enums/MailProviderType.cs | 2 +- Wino.Core.Domain/Enums/MenuPaneMode.cs | 2 +- .../Enums/NavigationReferenceFrame.cs | 2 +- Wino.Core.Domain/Enums/PickFolderReason.cs | 2 +- Wino.Core.Domain/Enums/ReaderFont.cs | 2 +- Wino.Core.Domain/Enums/SortingOptionType.cs | 2 +- Wino.Core.Domain/Enums/SpecialFolderType.cs | 2 +- Wino.Core.Domain/Enums/StorePurchaseResult.cs | 2 +- .../Enums/SynchronizationCompletedState.cs | 2 +- Wino.Core.Domain/Enums/SynchronizationType.cs | 2 +- Wino.Core.Domain/Enums/WinoPage.cs | 2 +- .../Enums/WinoServerConnectionStatus.cs | 2 +- .../AccountSetupCanceledException.cs | 4 +- .../AuthenticationAttentionException.cs | 4 +- .../Exceptions/AuthenticationException.cs | 2 +- ...oundTaskExecutionRequestDeniedException.cs | 2 +- ...ckgroundTaskRegistrationFailedException.cs | 2 +- .../ComposerMimeNotFoundException.cs | 2 +- .../CustomThemeCreationFailedException.cs | 2 +- .../GoogleAuthenticationException.cs | 4 +- .../Exceptions/ImapClientPoolException.cs | 4 +- .../Exceptions/ImapConnectionFailedPackage.cs | 4 +- .../Exceptions/InvalidMoveTargetException.cs | 2 +- .../SynchronizerEntityNotFoundException.cs | 2 +- .../Exceptions/SynchronizerException.cs | 2 +- ...stemFolderConfigurationMissingException.cs | 4 +- .../UnavailableSpecialFolderException.cs | 4 +- .../Extensions/LongExtensions.cs | 20 +- .../Extensions/MailkitClientExtensions.cs | 14 ++ Wino.Core.Domain/Extensions/MimeExtensions.cs | 22 ++ ...questExecutionSynchronizationInterfaces.cs | 2 +- .../Interfaces/IAccountCreationDialog.cs | 4 +- .../Interfaces/IAccountMenuItem.cs | 4 +- .../Interfaces/IAccountPickerDialog.cs | 2 +- .../IAccountProviderDetailViewModel.cs | 2 +- .../Interfaces/IAccountProviderDetails.cs | 4 +- .../Interfaces/IAccountService.cs | 4 +- .../Interfaces/IApplicationConfiguration.cs | 2 +- .../Interfaces/IApplicationResourceManager.cs | 2 +- .../Interfaces/IAuthenticationProvider.cs | 4 +- Wino.Core.Domain/Interfaces/IAuthenticator.cs | 6 +- .../Interfaces/IAutoDiscoveryService.cs | 4 +- .../Interfaces/IBaseSynchronizer.cs | 10 +- .../Interfaces/IClipboardService.cs | 2 +- .../Interfaces/IConfigurationService.cs | 2 +- .../Interfaces/IConfirmationDialog.cs | 2 +- .../Interfaces/IContactService.cs | 12 + .../Interfaces/IContextMenuItemService.cs | 8 +- .../Interfaces/IContextMenuProvider.cs | 8 +- .../ICustomServerAccountCreationDialog.cs | 4 +- .../Interfaces/IDatabaseService.cs | 9 + .../Interfaces/IDefaultChangeProcessor.cs | 44 ++++ Wino.Core.Domain/Interfaces/IDialogService.cs | 10 +- Wino.Core.Domain/Interfaces/IDispatcher.cs | 2 +- Wino.Core.Domain/Interfaces/IFileService.cs | 2 +- .../Interfaces/IFolderMenuItem.cs | 8 +- Wino.Core.Domain/Interfaces/IFolderService.cs | 27 ++- Wino.Core.Domain/Interfaces/IFontService.cs | 6 +- .../Interfaces/IGmailAuthenticator.cs | 4 + .../Interfaces/IGmailChangeProcessor.cs | 7 + Wino.Core.Domain/Interfaces/IHtmlPreviewer.cs | 11 + .../Interfaces/IImapChangeProcessor.cs | 11 + .../Interfaces/IImapTestService.cs | 4 +- .../Interfaces/IInitializeAsync.cs | 2 +- .../Interfaces/IKeyPressService.cs | 2 +- .../Interfaces/ILaunchProtocolService.cs | 2 +- .../Interfaces/ILogInitializer.cs | 2 +- Wino.Core.Domain/Interfaces/IMailService.cs | 8 +- Wino.Core.Domain/Interfaces/IMenuItem.cs | 2 +- Wino.Core.Domain/Interfaces/IMenuOperation.cs | 2 +- .../Interfaces/IMimeFileService.cs | 68 ++++++ .../Interfaces/INativeAppService.cs | 4 +- .../Interfaces/INavigationAware.cs | 4 +- .../Interfaces/INotificationBuilder.cs | 4 +- .../Interfaces/IOutlookAuthenticator.cs | 4 + .../Interfaces/IOutlookChangeProcessor.cs | 22 ++ .../Interfaces/IPreferencesService.cs | 6 +- .../Interfaces/IProviderDetail.cs | 4 +- .../Interfaces/IProviderService.cs | 4 +- Wino.Core.Domain/Interfaces/IRequestBundle.cs | 6 +- Wino.Core.Domain/Interfaces/IServerMessage.cs | 2 +- .../Interfaces/ISignatureService.cs | 4 +- .../Interfaces/IStatePersistenceService.cs | 2 +- .../Interfaces/IStoreManagementService.cs | 6 +- .../Interfaces/IStoreRatingDialog.cs | 2 +- .../Interfaces/IStoreRatingService.cs | 2 +- .../Interfaces/ISynchronizationProgress.cs | 2 +- Wino.Core.Domain/Interfaces/IThemeService.cs | 6 +- .../Interfaces/IThreadingStrategy.cs | 14 +- .../Interfaces/IThreadingStrategyProvider.cs | 4 +- Wino.Core.Domain/Interfaces/ITokenService.cs | 10 + .../Interfaces/ITranslationService.cs | 6 +- .../Interfaces/IUnderlyingThemeService.cs | 2 +- .../Interfaces/IUnsubscriptionService.cs | 4 +- .../Interfaces/IWinoNavigationService.cs | 8 +- .../Interfaces/IWinoRequestDelegator.cs | 21 +- .../Interfaces/IWinoRequestProcessor.cs | 6 +- .../IWinoServerConnectionManager.cs | 4 +- .../Accounts/AccountCreationDialogResult.cs | 4 +- .../Accounts/ImapAuthenticationMethodModel.cs | 4 +- .../Accounts/ImapConnectionSecurityModel.cs | 4 +- .../Models/Accounts/ProviderDetail.cs | 6 +- .../Models/Accounts/UnreadItemCountResult.cs | 4 +- .../Authentication/TokenInformationBase.cs | 2 +- .../GoogleAuthorizationRequest.cs | 7 +- .../GoogleTokenizationRequest.cs | 5 +- .../AutoDiscoveryMinimalSettings.cs | 2 +- .../AutoDiscoveryProviderSetting.cs | 2 +- .../AutoDiscovery/AutoDiscoverySettings.cs | 4 +- .../Models/Comparers/DateComparer.cs | 4 +- .../Models/Comparers/DateTimeComparer.cs | 2 +- .../Models/Comparers/FolderNameComparer.cs | 4 +- .../Models/Comparers/ListItemComparer.cs | 4 +- .../Models/Comparers/NameComparer.cs | 4 +- .../Models/Folders/AccountFolderTree.cs | 6 +- .../Models/Folders/FolderOperationMenuItem.cs | 8 +- .../FolderOperationPreperationRequest.cs | 6 +- .../Models/Folders/IMailItemFolder.cs | 4 +- .../Models/MailItem/DraftCreationOptions.cs | 6 +- .../MailItem/DraftPreperationRequest.cs | 4 +- .../Models/MailItem/IMailHashContainer.cs | 2 +- Wino.Core.Domain/Models/MailItem/IMailItem.cs | 4 +- .../Models/MailItem/IMailItemThread.cs | 2 +- .../Models/MailItem/MailDetailInformation.cs | 4 +- .../Models/MailItem/MailDragPackage.cs | 2 +- .../Models/MailItem/MailFolderPairMetadata.cs | 2 +- .../Models/MailItem/MailInsertPackage.cs | 4 +- .../MailItem/MailListInitializationOptions.cs | 6 +- .../MailOperationPreperationRequest.cs | 8 +- .../Models/MailItem/MimeMessageInformation.cs | 2 +- .../OutlookSpecialFolderIdInformation.cs | 2 +- .../MailItem/SendDraftPreparationRequest.cs | 4 +- .../Models/MailItem/ThreadMailItem.cs | 4 +- .../Models/MailItem/ToggleRequestRule.cs | 4 +- .../Models/Menus/MailOperationMenuItem.cs | 6 +- .../Models/Menus/MenuOperationItemBase.cs | 2 +- .../Models}/Mime/HtmlPreviewVisitor.cs | 7 +- .../Navigation/NavigateMailFolderEventArgs.cs | 4 +- .../Models/Navigation/NavigationMode.cs | 2 +- .../Navigation/NavigationTransitionType.cs | 2 +- .../Models/Personalization/AppThemeBase.cs | 4 +- .../Personalization/CustomThemeMetadata.cs | 2 +- .../Personalization/ElementThemeContainer.cs | 4 +- .../MailListPaneLengthPreferences.cs | 2 +- .../Models/Reader/EditorToolbarSection.cs | 5 +- .../Models/Reader/FilterOption.cs | 4 +- .../Models/Reader/MailRenderModel.cs | 2 +- .../Models/Reader/MailRenderingOptions.cs | 2 +- .../Models/Reader/ReaderFontModel.cs | 4 +- .../Models/Reader/SortingOption.cs | 9 +- .../Models/Reader/WebViewMessage.cs | 2 +- .../Models/Requests/RequestBase.cs | 8 +- .../Models/Store/StoreProductType.cs | 2 +- .../Synchronization/SynchronizationOptions.cs | 6 +- .../Synchronization/SynchronizationResult.cs | 6 +- .../Models/Translations/AppLanguageModel.cs | 4 +- .../Translations/WinoTranslationDictionary.cs | 4 +- Wino.Core.Domain/Translator.Designer.cs | 8 +- Wino.Core.Domain/Translator.tt | 8 +- ....Core.Domain.csproj => Wino.Domain.csproj} | 4 +- Wino.Core.Domain/WinoErrors.cs | 2 +- .../Authenticators/CustomAuthenticator.cs | 34 --- .../Authenticators/YahooAuthenticator.cs | 40 ---- Wino.Core/Extensions/FolderTreeExtensions.cs | 31 --- Wino.Core/Extensions/MimeExtensions.cs | 52 ----- .../Processors/DefaultChangeProcessor.cs | 149 ------------ .../Threading/GmailThreadingStrategy.cs | 10 - .../Accounts/AccountMenuItemExtended.cs | 14 -- .../Accounts/AccountMenuItemsReordered.cs | 11 - .../Accounts/AccountsMenuRefreshRequested.cs | 7 - .../ProtocolAuthorizationCallbackReceived.cs | 10 - .../Mails/CancelRenderingContentRequested.cs | 7 - .../Mails/ClearMailSelectionsRequested.cs | 7 - .../Mails/DisposeRenderingFrameRequested.cs | 7 - .../Messages/Mails/HtmlRenderingRequested.cs | 8 - .../Mails/ImapSetupBackNavigationRequested.cs | 12 - .../Mails/ImapSetupDismissRequested.cs | 10 - .../Mails/ImapSetupNavigationRequested.cs | 11 - .../Mails/MailItemNavigationRequested.cs | 11 - .../Messages/Mails/NavigateMailFolderEvent.cs | 17 -- .../Mails/RefreshUnreadCountsMessage.cs | 6 - .../Messages/Mails/SaveAsPDFRequested.cs | 11 - .../Mails/SelectedMailItemsChanged.cs | 8 - .../BackBreadcrumNavigationRequested.cs | 7 - .../BreadcrumbNavigationRequested.cs | 12 - .../Navigation/NavigateSettingsRequested.cs | 7 - .../Messages/Shell/ApplicationThemeChanged.cs | 8 - ...ateNewMailWithMultipleAccountsRequested.cs | 16 -- .../Messages/Shell/InfoBarMessageRequested.cs | 17 -- Wino.Core/Messages/Shell/LanguageChanged.cs | 7 - .../Shell/MailtoProtocolMessageRequested.cs | 4 - .../Shell/NavigationPaneModeChanged.cs | 10 - Wino.Core/Messages/Shell/ShellStateUpdated.cs | 7 - .../AccountSynchronizationCompleted.cs | 7 - .../AccountSynchronizerStateChanged.cs | 12 - .../NewSynchronizationRequested.cs | 10 - Wino.Core/Services/AuthenticationProvider.cs | 34 --- Wino.Mail.ViewModels/AboutPageViewModel.cs | 15 +- .../AccountDetailsPageViewModel.cs | 12 +- .../AccountManagementViewModel.cs | 16 +- Wino.Mail.ViewModels/AppShellViewModel.cs | 177 ++++++++++++-- Wino.Mail.ViewModels/BaseViewModel.cs | 8 +- .../Collections/WinoMailCollection.cs | 10 +- Wino.Mail.ViewModels/ComposePageViewModel.cs | 32 +-- .../Data/AccountProviderDetailViewModel.cs | 4 +- .../Data/BreadcrumbNavigationItemViewModel.cs | 2 +- .../Data/FolderPivotViewModel.cs | 2 +- .../Data/MailAttachmentViewModel.cs | 4 +- .../Data/MailItemViewModel.cs | 4 +- .../Data}/MenuItems/AccountMenuItem.cs | 10 +- .../MenuItems/FixAccountIssuesMenuItem.cs | 8 +- .../Data}/MenuItems/FolderMenuItem.cs | 12 +- .../Data}/MenuItems/ManageAccountsMenuItem.cs | 2 +- .../Data}/MenuItems/MenuItemBase.cs | 4 +- .../Data}/MenuItems/MenuItemCollection.cs | 6 +- .../MenuItems/MergedAccountFolderMenuItem.cs | 12 +- .../Data}/MenuItems/MergedAccountMenuItem.cs | 6 +- .../MergedAccountMoreFolderMenuItem.cs | 4 +- .../Data}/MenuItems/NewMailMenuItem.cs | 2 +- .../MenuItems/ObservableRangeCollection.cs | 6 +- .../Data}/MenuItems/RateMenuItem.cs | 2 +- .../Data}/MenuItems/SeperatorItem.cs | 2 +- .../Data}/MenuItems/SettingsItem.cs | 2 +- .../MergedAccountProviderDetailViewModel.cs | 4 +- .../Data/ThreadMailItemViewModel.cs | 4 +- Wino.Mail.ViewModels/IdlePageViewModel.cs | 2 +- .../LanguageTimePageViewModel.cs | 6 +- Wino.Mail.ViewModels/MailListPageViewModel.cs | 29 +-- .../MailRenderingPageViewModel.cs | 34 +-- .../MergedAccountDetailsPageViewModel.cs | 8 +- .../MessageListPageViewModel.cs | 6 +- .../Messages/ActiveMailFolderChangedEvent.cs | 4 +- .../Messages/ActiveMailItemChangedEvent.cs | 4 +- .../NewAccountManagementPageViewModel.cs | 2 +- .../PersonalizationPageViewModel.cs | 8 +- .../ReadingPanePageViewModel.cs | 6 +- .../SettingOptionsPageViewModel.cs | 10 +- Wino.Mail.ViewModels/SettingsPageViewModel.cs | 2 +- Wino.Mail.ViewModels/SettingsViewModel.cs | 2 +- .../SignatureManagementPageViewModel.cs | 8 +- .../ViewModelContainerSetup.cs | 30 +++ Wino.Mail.ViewModels/WelcomePageViewModel.cs | 9 +- .../Wino.Mail.ViewModels.csproj | 8 +- Wino.Mail.sln | 215 ++++++++++-------- Wino.Mail/App.xaml.cs | 8 +- Wino.Mail/AppShell.xaml | 6 +- Wino.Mail/AppShell.xaml.cs | 21 +- Wino.Mail/BasePage.cs | 7 +- .../Behaviors/BindableCommandBarBehavior.cs | 7 +- .../CreateMailNavigationItemBehavior.cs | 4 +- Wino.Mail/Controls/AccountNavigationItem.cs | 2 +- .../Controls/Advanced/WinoAppTitleBar.xaml.cs | 4 +- Wino.Mail/Controls/Advanced/WinoListView.cs | 7 +- Wino.Mail/Controls/ImagePreviewControl.cs | 3 +- .../MailItemDisplayInformationControl.xaml | 4 +- .../MailItemDisplayInformationControl.xaml.cs | 7 +- Wino.Mail/Controls/RendererCommandBar.cs | 7 +- Wino.Mail/Controls/WinoInfoBar.cs | 4 +- Wino.Mail/Controls/WinoSwipeControlItems.cs | 7 +- Wino.Mail/Dialogs/AccountCreationDialog.xaml | 2 +- .../Dialogs/AccountCreationDialog.xaml.cs | 2 +- Wino.Mail/Dialogs/AccountEditDialog.xaml | 2 +- Wino.Mail/Dialogs/AccountEditDialog.xaml.cs | 4 +- Wino.Mail/Dialogs/AccountPickerDialog.xaml | 2 +- Wino.Mail/Dialogs/AccountPickerDialog.xaml.cs | 3 +- Wino.Mail/Dialogs/AccountReorderDialog.xaml | 4 +- .../Dialogs/AccountReorderDialog.xaml.cs | 3 +- .../Dialogs/BaseAccountCreationDialog.cs | 7 +- Wino.Mail/Dialogs/ConfirmationDialog.xaml | 2 +- Wino.Mail/Dialogs/ConfirmationDialog.xaml.cs | 3 +- .../Dialogs/CustomThemeBuilderDialog.xaml | 2 +- .../Dialogs/CustomThemeBuilderDialog.xaml.cs | 3 +- Wino.Mail/Dialogs/MoveMailDialog.xaml | 4 +- Wino.Mail/Dialogs/MoveMailDialog.xaml.cs | 5 +- Wino.Mail/Dialogs/NewAccountDialog.xaml | 4 +- Wino.Mail/Dialogs/NewAccountDialog.xaml.cs | 10 +- Wino.Mail/Dialogs/NewImapSetupDialog.xaml.cs | 12 +- Wino.Mail/Dialogs/SignatureEditorDialog.xaml | 4 +- .../Dialogs/SignatureEditorDialog.xaml.cs | 11 +- Wino.Mail/Dialogs/StoreRatingDialog.xaml | 2 +- Wino.Mail/Dialogs/StoreRatingDialog.xaml.cs | 3 +- .../SystemFolderConfigurationDialog.xaml | 2 +- .../SystemFolderConfigurationDialog.xaml.cs | 18 +- Wino.Mail/Dialogs/TextInputDialog.xaml | 2 +- Wino.Mail/Dialogs/WinoMessageDialog.xaml | 2 +- Wino.Mail/Extensions/UIExtensions.cs | 2 +- Wino.Mail/Helpers/XamlHelpers.cs | 11 +- .../MenuFlyouts/AccountSelectorFlyout.cs | 3 +- Wino.Mail/MenuFlyouts/FilterMenuFlyout.cs | 3 +- .../MenuFlyouts/FolderOperationFlyout.cs | 5 +- .../FolderOperationMenuFlyoutItem.cs | 2 +- Wino.Mail/MenuFlyouts/MailOperationFlyout.cs | 5 +- .../MailOperationMenuFlyoutItem.cs | 2 +- Wino.Mail/MenuFlyouts/MoveButtonFlyout.cs | 3 +- .../MenuFlyouts/RendererCommandBarItem.cs | 3 +- .../MenuFlyouts/WinoOperationFlyoutItem.cs | 9 +- Wino.Mail/PartialApp.cs | 81 ++----- .../AppThemePreviewTemplateSelector.cs | 5 +- .../Selectors/FileAttachmentTypeSelector.cs | 3 +- ...lItemDisplayModePreviewTemplateSelector.cs | 4 +- .../NavigationMenuTemplateSelector.cs | 9 +- .../RendererCommandBarItemTemplateSelector.cs | 6 +- .../Services/ApplicationResourceManager.cs | 3 +- Wino.Mail/Services/DialogService.cs | 33 ++- Wino.Mail/Services/LaunchProtocolService.cs | 2 +- Wino.Mail/Services/ToastActivationService.cs | 2 +- Wino.Mail/Services/WinoNavigationService.cs | 16 +- Wino.Mail/Styles/CommandBarItems.xaml | 2 +- Wino.Mail/Styles/ItemContainerStyles.xaml | 2 +- .../Views/Account/AccountDetailsPage.xaml | 6 +- .../Views/Account/AccountDetailsPage.xaml.cs | 5 +- .../Views/Account/AccountManagementPage.xaml | 2 +- .../Account/MergedAccountDetailsPage.xaml | 2 +- Wino.Mail/Views/ComposePage.xaml | 6 +- Wino.Mail/Views/ComposePage.xaml.cs | 12 +- .../ImapSetup/AdvancedImapSetupPage.xaml | 2 +- .../ImapSetup/AdvancedImapSetupPage.xaml.cs | 39 ++-- .../ImapSetup/ImapConnectionFailedPage.xaml | 2 +- .../ImapConnectionFailedPage.xaml.cs | 15 +- .../ImapSetup/PreparingImapFoldersPage.xaml | 2 +- .../ImapSetup/TestingImapConnectionPage.xaml | 2 +- .../TestingImapConnectionPage.xaml.cs | 16 +- .../Views/ImapSetup/WelcomeImapSetupPage.xaml | 2 +- .../ImapSetup/WelcomeImapSetupPage.xaml.cs | 15 +- Wino.Mail/Views/MailListPage.xaml | 4 +- Wino.Mail/Views/MailListPage.xaml.cs | 25 +- Wino.Mail/Views/MailRenderingPage.xaml | 4 +- Wino.Mail/Views/MailRenderingPage.xaml.cs | 14 +- .../Views/NewAccountManagementPage.xaml.cs | 10 +- Wino.Mail/Views/Settings/AboutPage.xaml | 2 +- .../Views/Settings/LanguageTimePage.xaml | 2 +- Wino.Mail/Views/Settings/MessageListPage.xaml | 2 +- .../Views/Settings/PersonalizationPage.xaml | 6 +- Wino.Mail/Views/Settings/ReadingPanePage.xaml | 4 +- .../Views/Settings/SettingOptionsPage.xaml | 6 +- .../Settings/SignatureManagementPage.xaml | 6 +- Wino.Mail/Views/SettingsPage.xaml.cs | 9 +- Wino.Mail/Wino.Mail.csproj | 9 +- Wino.Mail/WinoMailContainerSetup.cs | 18 ++ .../Accounts/AccountMenuItemExtended.cs | 2 +- .../Accounts/AccountMenuItemsReordered.cs | 0 .../Accounts/AccountsMenuRefreshRequested.cs | 0 .../ProtocolAuthorizationCallbackReceived.cs | 0 .../Mails/CancelRenderingContentRequested.cs | 0 .../Mails/ClearMailSelectionsRequested.cs | 0 .../Mails/CreateNewComposeMailRequested.cs | 2 +- .../Mails/DisposeRenderingFrameRequested.cs | 0 .../Client/Mails/HtmlRenderingRequested.cs | 0 .../Mails/ImapSetupBackNavigationRequested.cs | 0 .../Client/Mails/ImapSetupDismissRequested.cs | 2 +- .../Mails/ImapSetupNavigationRequested.cs | 0 .../Mails/MailItemNavigationRequested.cs | 0 .../Client/Mails/NavigateMailFolderEvent.cs | 4 +- .../Mails/RefreshUnreadCountsMessage.cs | 0 .../Client/Mails/SaveAsPDFRequested.cs | 0 .../Client/Mails/SelectedMailItemsChanged.cs | 0 .../BackBreadcrumNavigationRequested.cs | 0 .../BreadcrumbNavigationRequested.cs | 2 +- .../Navigation/NavigateSettingsRequested.cs | 0 .../Client/Shell/ApplicationThemeChanged.cs | 0 ...ateNewMailWithMultipleAccountsRequested.cs | 2 +- .../Client/Shell/InfoBarMessageRequested.cs | 2 +- .../Client/Shell/LanguageChanged.cs | 0 .../Shell/MailtoProtocolMessageRequested.cs | 0 .../Client/Shell/NavigationPaneModeChanged.cs | 2 +- .../Client/Shell/ShellStateUpdated.cs | 0 .../AccountSynchronizationCompleted.cs | 2 +- .../AccountSynchronizerStateChanged.cs | 4 +- .../NewSynchronizationRequested.cs | 2 +- .../Enums/MessageType.cs | 0 .../MessageConstants.cs | 0 .../Server/AccountCreatedMessage.cs | 2 +- .../Server/AccountRemovedMessage.cs | 2 +- .../Server/AccountUpdatedMessage.cs | 2 +- .../Server/DraftCreated.cs | 2 +- .../Server/DraftFailed.cs | 2 +- .../Server/DraftMapped.cs | 0 .../Server/FolderRenamed.cs | 2 +- .../Server/FolderSynchronizationEnabled.cs | 2 +- .../Server/MailAddedMessage.cs | 2 +- .../Server/MailDownloadedMessage.cs | 2 +- .../Server/MailRemovedMessage.cs | 2 +- .../Server/MailUpdatedMessage.cs | 2 +- .../Server/MergedInboxRenamed.cs | 0 .../Server/ServerMessageBase.cs | 2 +- .../Wino.Messaging.csproj | 2 +- Wino.Packaging/Wino.Packaging.wapproj | 1 + Wino.Server.WPF/App.xaml.cs | 21 +- Wino.Server.WPF/ServerContext.cs | 11 +- Wino.Server.WPF/ServerViewModel.cs | 2 +- Wino.Server.WPF/Wino.Server.NET8.csproj | 50 ---- Wino.Server.WPF/Wino.Server.csproj | 8 +- .../Authenticators/BaseAuthenticator.cs | 8 +- .../Authenticators/GmailAuthenticator.cs | 21 +- .../Authenticators/Office365Authenticator.cs | 7 +- .../Authenticators/OutlookAuthenticator.cs | 17 +- .../Extensions/HtmlAgilityPackExtensions.cs | 5 +- .../Extensions/SqlKataExtensions.cs | 2 +- .../Extensions/TokenizationExtensions.cs | 4 +- .../Processors/DefaultChangeProcessor.cs | 75 ++++++ .../Processors/GmailChangeProcessor.cs | 5 +- .../Processors/ImapChangeProcessor.cs | 5 +- .../Processors/OutlookChangeProcessor.cs | 5 +- .../Processors}/WinoRequestProcessor.cs | 29 +-- .../Requests/AlwaysMoveToRequest.cs | 10 +- .../Requests/ArchiveRequest.cs | 10 +- .../Requests/Bundles/RequestBundle.cs | 4 +- .../Requests/Bundles/TaskRequestBundle.cs | 4 +- .../Requests/ChangeFlagRequest.cs | 10 +- .../Requests/CreateDraftRequest.cs | 10 +- .../Requests/DeleteRequest.cs | 10 +- .../Requests/EmptyFolderRequest.cs | 10 +- .../Requests/MarkFolderAsReadRequest.cs | 10 +- .../Requests/MarkReadRequest.cs | 10 +- .../Requests/MoveRequest.cs | 10 +- .../Requests/MoveToFocusedRequest.cs | 10 +- .../Requests/RenameFolderRequest.cs | 8 +- .../Requests/SendDraftRequest.cs | 10 +- .../Services/AccountService.cs | 16 +- .../Services/ApplicationConfiguration.cs | 4 +- .../Services/AuthenticationProvider.cs | 38 ++++ .../Services/AutoDiscoveryService.cs | 6 +- .../Services/BaseDatabaseService.cs | 4 +- .../Services/ContactService.cs | 14 +- .../Services/ContextMenuItemService.cs | 12 +- .../Services/DatabaseService.cs | 11 +- .../Services/FolderService.cs | 192 +++------------- .../Services/FontService.cs | 8 +- Wino.Services/Services/HtmlPreviewer.cs | 10 + .../Services/LogInitializer.cs | 8 +- .../Services/MailService.cs | 62 ++++- .../Services/MimeFileService.cs | 73 +----- .../Services/ProviderService.cs | 8 +- .../Services/SignatureService.cs | 6 +- .../Services/ThreadingStrategyProvider.cs | 19 +- .../Services/TokenService.cs | 11 +- .../Services/TranslationService.cs | 14 +- .../Services/UnsubscriptionService.cs | 6 +- .../Services/WinoRequestDelegator.cs | 28 +-- .../ServicesContainerSetup.cs | 43 ++-- .../Threading/APIThreadingStrategy.cs | 12 +- .../Threading/GmailThreadingStrategy.cs | 9 + .../Threading/ImapThreadStrategy.cs | 18 +- .../Threading/OutlookThreadingStrategy.cs | 7 +- Wino.Services/Wino.Services.csproj | 27 +++ .../Extensions/ElementThemeExtensions.cs | 7 +- .../Models/Personalization/CustomAppTheme.cs | 8 +- .../Personalization/PreDefinedAppTheme.cs | 6 +- .../Models/Personalization/SystemAppTheme.cs | 4 +- .../Properties/AssemblyInfo.cs | 0 .../Properties/Wino.Core.UWP.rd.xml | 0 .../Services/AppShellService.cs | 3 +- .../Services/ClipboardService.cs | 4 +- .../Services/ConfigurationService.cs | 4 +- .../Services/FileService.cs | 4 +- .../Services/KeyPressService.cs | 6 +- .../Services/NativeAppService.cs | 9 +- .../Services/NotificationBuilder.cs | 29 ++- .../Services/PreferencesService.cs | 12 +- .../Services/StatePersistenceService.cs | 6 +- .../Services/StoreManagementService.cs | 6 +- .../Services/StoreRatingService.cs | 15 +- .../Services/ThemeService.cs | 29 ++- .../Services/ThumbnailService.cs | 4 +- .../Services/UnderlyingThemeService.cs | 7 +- .../Services/WinoServerConnectionManager.cs | 6 +- .../SharedWinRTContainerSetup.cs | 12 +- .../WinAppDispatcher.cs | 4 +- .../Wino.Shared.WinRT.csproj | 7 +- .../Extensions/GoogleIntegratorExtensions.cs | 62 +++-- .../Extensions/ListExtensions.cs | 4 +- .../Extensions/MailkitClientExtensions.cs | 21 +- .../Extensions/MailkitExtensions.cs | 5 +- .../Extensions/OutlookIntegratorExtensions.cs | 4 +- .../Extensions/StringExtensions.cs | 0 .../GlobalSuppressions.cs | 0 .../Http/GmailClientMessageHandler.cs | 2 +- .../Http/MicrosoftImmutableIdHandler.cs | 0 .../Http/MicrosoftTokenProvider.cs | 4 +- .../Integration/BaseMailIntegrator.cs | 5 +- .../Integration/ImapClientPool.cs | 6 +- .../Mime/ImapMessageCreationPackage.cs | 0 .../Misc/RequestComparer.cs | 4 +- .../Services/ImapTestService.cs | 9 +- .../SynchronizationContainerSetup.cs | 14 ++ .../Synchronizers/BaseSynchronizer.cs | 18 +- .../Synchronizers/GmailSynchronizer.cs | 22 +- .../Synchronizers/ImapSynchronizer.cs | 48 ++-- .../Synchronizers/OutlookSynchronizer.cs | 23 +- .../Wino.Synchronization.csproj | 10 +- 523 files changed, 2254 insertions(+), 2375 deletions(-) rename {Wino.Core => Wino.Core.Domain}/Extensions/LongExtensions.cs (78%) create mode 100644 Wino.Core.Domain/Extensions/MailkitClientExtensions.cs create mode 100644 Wino.Core.Domain/Extensions/MimeExtensions.cs create mode 100644 Wino.Core.Domain/Interfaces/IContactService.cs create mode 100644 Wino.Core.Domain/Interfaces/IDatabaseService.cs create mode 100644 Wino.Core.Domain/Interfaces/IDefaultChangeProcessor.cs create mode 100644 Wino.Core.Domain/Interfaces/IGmailAuthenticator.cs create mode 100644 Wino.Core.Domain/Interfaces/IGmailChangeProcessor.cs create mode 100644 Wino.Core.Domain/Interfaces/IHtmlPreviewer.cs create mode 100644 Wino.Core.Domain/Interfaces/IImapChangeProcessor.cs create mode 100644 Wino.Core.Domain/Interfaces/IMimeFileService.cs create mode 100644 Wino.Core.Domain/Interfaces/IOutlookAuthenticator.cs create mode 100644 Wino.Core.Domain/Interfaces/IOutlookChangeProcessor.cs create mode 100644 Wino.Core.Domain/Interfaces/ITokenService.cs rename {Wino.Core => Wino.Core.Domain/Models}/Mime/HtmlPreviewVisitor.cs (98%) rename Wino.Core.Domain/{Wino.Core.Domain.csproj => Wino.Domain.csproj} (96%) delete mode 100644 Wino.Core/Authenticators/CustomAuthenticator.cs delete mode 100644 Wino.Core/Authenticators/YahooAuthenticator.cs delete mode 100644 Wino.Core/Extensions/FolderTreeExtensions.cs delete mode 100644 Wino.Core/Extensions/MimeExtensions.cs delete mode 100644 Wino.Core/Integration/Processors/DefaultChangeProcessor.cs delete mode 100644 Wino.Core/Integration/Threading/GmailThreadingStrategy.cs delete mode 100644 Wino.Core/Messages/Accounts/AccountMenuItemExtended.cs delete mode 100644 Wino.Core/Messages/Accounts/AccountMenuItemsReordered.cs delete mode 100644 Wino.Core/Messages/Accounts/AccountsMenuRefreshRequested.cs delete mode 100644 Wino.Core/Messages/Authorization/ProtocolAuthorizationCallbackReceived.cs delete mode 100644 Wino.Core/Messages/Mails/CancelRenderingContentRequested.cs delete mode 100644 Wino.Core/Messages/Mails/ClearMailSelectionsRequested.cs delete mode 100644 Wino.Core/Messages/Mails/DisposeRenderingFrameRequested.cs delete mode 100644 Wino.Core/Messages/Mails/HtmlRenderingRequested.cs delete mode 100644 Wino.Core/Messages/Mails/ImapSetupBackNavigationRequested.cs delete mode 100644 Wino.Core/Messages/Mails/ImapSetupDismissRequested.cs delete mode 100644 Wino.Core/Messages/Mails/ImapSetupNavigationRequested.cs delete mode 100644 Wino.Core/Messages/Mails/MailItemNavigationRequested.cs delete mode 100644 Wino.Core/Messages/Mails/NavigateMailFolderEvent.cs delete mode 100644 Wino.Core/Messages/Mails/RefreshUnreadCountsMessage.cs delete mode 100644 Wino.Core/Messages/Mails/SaveAsPDFRequested.cs delete mode 100644 Wino.Core/Messages/Mails/SelectedMailItemsChanged.cs delete mode 100644 Wino.Core/Messages/Navigation/BackBreadcrumNavigationRequested.cs delete mode 100644 Wino.Core/Messages/Navigation/BreadcrumbNavigationRequested.cs delete mode 100644 Wino.Core/Messages/Navigation/NavigateSettingsRequested.cs delete mode 100644 Wino.Core/Messages/Shell/ApplicationThemeChanged.cs delete mode 100644 Wino.Core/Messages/Shell/CreateNewMailWithMultipleAccountsRequested.cs delete mode 100644 Wino.Core/Messages/Shell/InfoBarMessageRequested.cs delete mode 100644 Wino.Core/Messages/Shell/LanguageChanged.cs delete mode 100644 Wino.Core/Messages/Shell/MailtoProtocolMessageRequested.cs delete mode 100644 Wino.Core/Messages/Shell/NavigationPaneModeChanged.cs delete mode 100644 Wino.Core/Messages/Shell/ShellStateUpdated.cs delete mode 100644 Wino.Core/Messages/Synchronization/AccountSynchronizationCompleted.cs delete mode 100644 Wino.Core/Messages/Synchronization/AccountSynchronizerStateChanged.cs delete mode 100644 Wino.Core/Messages/Synchronization/NewSynchronizationRequested.cs delete mode 100644 Wino.Core/Services/AuthenticationProvider.cs rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/AccountMenuItem.cs (94%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/FixAccountIssuesMenuItem.cs (70%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/FolderMenuItem.cs (93%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/ManageAccountsMenuItem.cs (56%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/MenuItemBase.cs (95%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/MenuItemCollection.cs (98%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/MergedAccountFolderMenuItem.cs (95%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/MergedAccountMenuItem.cs (91%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/MergedAccountMoreFolderMenuItem.cs (79%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/NewMailMenuItem.cs (53%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/ObservableRangeCollection.cs (96%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/RateMenuItem.cs (51%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/SeperatorItem.cs (52%) rename {Wino.Core => Wino.Mail.ViewModels/Data}/MenuItems/SettingsItem.cs (51%) create mode 100644 Wino.Mail.ViewModels/ViewModelContainerSetup.cs create mode 100644 Wino.Mail/WinoMailContainerSetup.cs rename {Wino.Messages => Wino.Messaging}/Client/Accounts/AccountMenuItemExtended.cs (93%) rename {Wino.Messages => Wino.Messaging}/Client/Accounts/AccountMenuItemsReordered.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Accounts/AccountsMenuRefreshRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Authorization/ProtocolAuthorizationCallbackReceived.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/CancelRenderingContentRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/ClearMailSelectionsRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/CreateNewComposeMailRequested.cs (85%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/DisposeRenderingFrameRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/HtmlRenderingRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/ImapSetupBackNavigationRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/ImapSetupDismissRequested.cs (91%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/ImapSetupNavigationRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/MailItemNavigationRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/NavigateMailFolderEvent.cs (86%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/RefreshUnreadCountsMessage.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/SaveAsPDFRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Mails/SelectedMailItemsChanged.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Navigation/BackBreadcrumNavigationRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Navigation/BreadcrumbNavigationRequested.cs (93%) rename {Wino.Messages => Wino.Messaging}/Client/Navigation/NavigateSettingsRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Shell/ApplicationThemeChanged.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Shell/CreateNewMailWithMultipleAccountsRequested.cs (93%) rename {Wino.Messages => Wino.Messaging}/Client/Shell/InfoBarMessageRequested.cs (95%) rename {Wino.Messages => Wino.Messaging}/Client/Shell/LanguageChanged.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Shell/MailtoProtocolMessageRequested.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Shell/NavigationPaneModeChanged.cs (88%) rename {Wino.Messages => Wino.Messaging}/Client/Shell/ShellStateUpdated.cs (100%) rename {Wino.Messages => Wino.Messaging}/Client/Synchronization/AccountSynchronizationCompleted.cs (87%) rename {Wino.Messages => Wino.Messaging}/Client/Synchronization/AccountSynchronizerStateChanged.cs (84%) rename {Wino.Messages => Wino.Messaging}/Client/Synchronization/NewSynchronizationRequested.cs (85%) rename {Wino.Messages => Wino.Messaging}/Enums/MessageType.cs (100%) rename {Wino.Messages => Wino.Messaging}/MessageConstants.cs (100%) rename {Wino.Messages => Wino.Messaging}/Server/AccountCreatedMessage.cs (79%) rename {Wino.Messages => Wino.Messaging}/Server/AccountRemovedMessage.cs (79%) rename {Wino.Messages => Wino.Messaging}/Server/AccountUpdatedMessage.cs (79%) rename {Wino.Messages => Wino.Messaging}/Server/DraftCreated.cs (80%) rename {Wino.Messages => Wino.Messaging}/Server/DraftFailed.cs (79%) rename {Wino.Messages => Wino.Messaging}/Server/DraftMapped.cs (100%) rename {Wino.Messages => Wino.Messaging}/Server/FolderRenamed.cs (76%) rename {Wino.Messages => Wino.Messaging}/Server/FolderSynchronizationEnabled.cs (79%) rename {Wino.Messages => Wino.Messaging}/Server/MailAddedMessage.cs (78%) rename {Wino.Messages => Wino.Messaging}/Server/MailDownloadedMessage.cs (80%) rename {Wino.Messages => Wino.Messaging}/Server/MailRemovedMessage.cs (79%) rename {Wino.Messages => Wino.Messaging}/Server/MailUpdatedMessage.cs (79%) rename {Wino.Messages => Wino.Messaging}/Server/MergedInboxRenamed.cs (100%) rename {Wino.Messages => Wino.Messaging}/Server/ServerMessageBase.cs (71%) rename {Wino.Messages => Wino.Messaging}/Wino.Messaging.csproj (78%) delete mode 100644 Wino.Server.WPF/Wino.Server.NET8.csproj rename {Wino.Core => Wino.Services}/Authenticators/BaseAuthenticator.cs (80%) rename {Wino.Core => Wino.Services}/Authenticators/GmailAuthenticator.cs (95%) rename {Wino.Core => Wino.Services}/Authenticators/Office365Authenticator.cs (70%) rename {Wino.Core => Wino.Services}/Authenticators/OutlookAuthenticator.cs (93%) rename {Wino.Core => Wino.Services}/Extensions/HtmlAgilityPackExtensions.cs (96%) rename {Wino.Core => Wino.Services}/Extensions/SqlKataExtensions.cs (89%) rename {Wino.Core => Wino.Services}/Extensions/TokenizationExtensions.cs (93%) create mode 100644 Wino.Services/Processors/DefaultChangeProcessor.cs rename {Wino.Core/Integration => Wino.Services}/Processors/GmailChangeProcessor.cs (85%) rename {Wino.Core/Integration => Wino.Services}/Processors/ImapChangeProcessor.cs (87%) rename {Wino.Core/Integration => Wino.Services}/Processors/OutlookChangeProcessor.cs (89%) rename {Wino.Core/Services => Wino.Services/Processors}/WinoRequestProcessor.cs (94%) rename {Wino.Core => Wino.Services}/Requests/AlwaysMoveToRequest.cs (84%) rename {Wino.Core => Wino.Services}/Requests/ArchiveRequest.cs (93%) rename {Wino.Core => Wino.Services}/Requests/Bundles/RequestBundle.cs (97%) rename {Wino.Core => Wino.Services}/Requests/Bundles/TaskRequestBundle.cs (91%) rename {Wino.Core => Wino.Services}/Requests/ChangeFlagRequest.cs (91%) rename {Wino.Core => Wino.Services}/Requests/CreateDraftRequest.cs (91%) rename {Wino.Core => Wino.Services}/Requests/DeleteRequest.cs (90%) rename {Wino.Core => Wino.Services}/Requests/EmptyFolderRequest.cs (83%) rename {Wino.Core => Wino.Services}/Requests/MarkFolderAsReadRequest.cs (85%) rename {Wino.Core => Wino.Services}/Requests/MarkReadRequest.cs (91%) rename {Wino.Core => Wino.Services}/Requests/MoveRequest.cs (90%) rename {Wino.Core => Wino.Services}/Requests/MoveToFocusedRequest.cs (82%) rename {Wino.Core => Wino.Services}/Requests/RenameFolderRequest.cs (83%) rename {Wino.Core => Wino.Services}/Requests/SendDraftRequest.cs (91%) rename {Wino.Core => Wino.Services}/Services/AccountService.cs (98%) rename {Wino.Core => Wino.Services}/Services/ApplicationConfiguration.cs (80%) create mode 100644 Wino.Services/Services/AuthenticationProvider.cs rename {Wino.Core => Wino.Services}/Services/AutoDiscoveryService.cs (94%) rename {Wino.Core => Wino.Services}/Services/BaseDatabaseService.cs (90%) rename {Wino.Core => Wino.Services}/Services/ContactService.cs (82%) rename {Wino.Core => Wino.Services}/Services/ContextMenuItemService.cs (97%) rename {Wino.Core => Wino.Services}/Services/DatabaseService.cs (89%) rename {Wino.Core => Wino.Services}/Services/FolderService.cs (75%) rename {Wino.Core => Wino.Services}/Services/FontService.cs (92%) create mode 100644 Wino.Services/Services/HtmlPreviewer.cs rename {Wino.Core => Wino.Services}/Services/LogInitializer.cs (84%) rename {Wino.Core => Wino.Services}/Services/MailService.cs (93%) rename {Wino.Core => Wino.Services}/Services/MimeFileService.cs (66%) rename {Wino.Core => Wino.Services}/Services/ProviderService.cs (87%) rename {Wino.Core => Wino.Services}/Services/SignatureService.cs (94%) rename {Wino.Core => Wino.Services}/Services/ThreadingStrategyProvider.cs (52%) rename {Wino.Core => Wino.Services}/Services/TokenService.cs (75%) rename {Wino.Core => Wino.Services}/Services/TranslationService.cs (92%) rename {Wino.Core => Wino.Services}/Services/UnsubscriptionService.cs (90%) rename {Wino.Core => Wino.Services}/Services/WinoRequestDelegator.cs (88%) rename Wino.Core/CoreContainerSetup.cs => Wino.Services/ServicesContainerSetup.cs (71%) rename {Wino.Core/Integration => Wino.Services}/Threading/APIThreadingStrategy.cs (95%) create mode 100644 Wino.Services/Threading/GmailThreadingStrategy.cs rename {Wino.Core/Integration => Wino.Services}/Threading/ImapThreadStrategy.cs (94%) rename {Wino.Core/Integration => Wino.Services}/Threading/OutlookThreadingStrategy.cs (77%) create mode 100644 Wino.Services/Wino.Services.csproj rename {Wino.Core.UWP => Wino.Shared.WinRT}/Extensions/ElementThemeExtensions.cs (93%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Models/Personalization/CustomAppTheme.cs (85%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Models/Personalization/PreDefinedAppTheme.cs (90%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Models/Personalization/SystemAppTheme.cs (77%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Properties/AssemblyInfo.cs (100%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Properties/Wino.Core.UWP.rd.xml (100%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/AppShellService.cs (80%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/ClipboardService.cs (84%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/ConfigurationService.cs (95%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/FileService.cs (95%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/KeyPressService.cs (88%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/NativeAppService.cs (97%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/NotificationBuilder.cs (93%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/PreferencesService.cs (97%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/StatePersistenceService.cs (97%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/StoreManagementService.cs (95%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/StoreRatingService.cs (92%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/ThemeService.cs (97%) rename {Wino.Core => Wino.Shared.WinRT}/Services/ThumbnailService.cs (94%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/UnderlyingThemeService.cs (94%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/Services/WinoServerConnectionManager.cs (98%) rename Wino.Core.UWP/CoreUWPContainerSetup.cs => Wino.Shared.WinRT/SharedWinRTContainerSetup.cs (81%) rename {Wino.Core.UWP => Wino.Shared.WinRT}/WinAppDispatcher.cs (89%) rename Wino.Core.UWP/Wino.Shared.csproj => Wino.Shared.WinRT/Wino.Shared.WinRT.csproj (76%) rename {Wino.Core => Wino.Synchronization}/Extensions/GoogleIntegratorExtensions.cs (87%) rename {Wino.Core => Wino.Synchronization}/Extensions/ListExtensions.cs (95%) rename {Wino.Core => Wino.Synchronization}/Extensions/MailkitClientExtensions.cs (91%) rename {Wino.Core => Wino.Synchronization}/Extensions/MailkitExtensions.cs (82%) rename {Wino.Core => Wino.Synchronization}/Extensions/OutlookIntegratorExtensions.cs (97%) rename {Wino.Core => Wino.Synchronization}/Extensions/StringExtensions.cs (100%) rename {Wino.Core => Wino.Synchronization}/GlobalSuppressions.cs (100%) rename {Wino.Core => Wino.Synchronization}/Http/GmailClientMessageHandler.cs (96%) rename {Wino.Core => Wino.Synchronization}/Http/MicrosoftImmutableIdHandler.cs (100%) rename {Wino.Core => Wino.Synchronization}/Http/MicrosoftTokenProvider.cs (94%) rename {Wino.Core => Wino.Synchronization}/Integration/BaseMailIntegrator.cs (98%) rename {Wino.Core => Wino.Synchronization}/Integration/ImapClientPool.cs (99%) rename {Wino.Core => Wino.Synchronization}/Mime/ImapMessageCreationPackage.cs (100%) rename {Wino.Core => Wino.Synchronization}/Misc/RequestComparer.cs (95%) rename {Wino.Core => Wino.Synchronization}/Services/ImapTestService.cs (86%) create mode 100644 Wino.Synchronization/SynchronizationContainerSetup.cs rename {Wino.Core => Wino.Synchronization}/Synchronizers/BaseSynchronizer.cs (98%) rename {Wino.Core => Wino.Synchronization}/Synchronizers/GmailSynchronizer.cs (98%) rename {Wino.Core => Wino.Synchronization}/Synchronizers/ImapSynchronizer.cs (95%) rename {Wino.Core => Wino.Synchronization}/Synchronizers/OutlookSynchronizer.cs (98%) rename Wino.Core/Wino.Core.csproj => Wino.Synchronization/Wino.Synchronization.csproj (81%) diff --git a/Wino.Core.Domain/Constants.cs b/Wino.Core.Domain/Constants.cs index 1123fbb8..f2970dbd 100644 --- a/Wino.Core.Domain/Constants.cs +++ b/Wino.Core.Domain/Constants.cs @@ -1,4 +1,6 @@ -namespace Wino.Core.Domain +using Wino.Domain.Enums; + +namespace Wino.Domain { public static class Constants { @@ -8,8 +10,35 @@ public const string WinoLocalDraftHeader = "X-Wino-Draft-Id"; public const string LocalDraftStartPrefix = "localDraft_"; + // Toast Notification Keys public const string ToastMailItemIdKey = nameof(ToastMailItemIdKey); public const string ToastMailItemRemoteFolderIdKey = nameof(ToastMailItemRemoteFolderIdKey); public const string ToastActionKey = nameof(ToastActionKey); + + // App Configuration + public const AppLanguage DefaultAppLanguage = AppLanguage.English; + public const string SharedFolderName = "WinoShared"; + public static char MailCopyUidSeparator = '_'; + + // GMail Category Labels + public const string FORUMS_LABEL_ID = "FORUMS"; + public const string UPDATES_LABEL_ID = "UPDATES"; + public const string PROMOTIONS_LABEL_ID = "PROMOTIONS"; + public const string SOCIAL_LABEL_ID = "SOCIAL"; + public const string PERSONAL_LABEL_ID = "PERSONAL"; + + public static string[] SubCategoryFolderLabelIds = + [ + FORUMS_LABEL_ID, + UPDATES_LABEL_ID, + PROMOTIONS_LABEL_ID, + SOCIAL_LABEL_ID, + PERSONAL_LABEL_ID + ]; + + // File Names + + public const string ProtocolLogFileName = "ImapProtocolLog.log"; + public const string WinoLogFileName = "WinoDiagnostics.log"; } } diff --git a/Wino.Core.Domain/Entities/AccountSignature.cs b/Wino.Core.Domain/Entities/AccountSignature.cs index b00f2a84..4383f09c 100644 --- a/Wino.Core.Domain/Entities/AccountSignature.cs +++ b/Wino.Core.Domain/Entities/AccountSignature.cs @@ -1,7 +1,7 @@ using System; using SQLite; -namespace Wino.Core.Domain.Entities +namespace Wino.Domain.Entities { public class AccountSignature { diff --git a/Wino.Core.Domain/Entities/AddressInformation.cs b/Wino.Core.Domain/Entities/AddressInformation.cs index de2bc308..b9168d0a 100644 --- a/Wino.Core.Domain/Entities/AddressInformation.cs +++ b/Wino.Core.Domain/Entities/AddressInformation.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; -namespace Wino.Core.Domain.Entities +namespace Wino.Domain.Entities { /// /// Back storage for simple name-address book. diff --git a/Wino.Core.Domain/Entities/CustomServerInformation.cs b/Wino.Core.Domain/Entities/CustomServerInformation.cs index b730ee5f..e760019b 100644 --- a/Wino.Core.Domain/Entities/CustomServerInformation.cs +++ b/Wino.Core.Domain/Entities/CustomServerInformation.cs @@ -1,8 +1,8 @@ using System; using SQLite; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Entities +namespace Wino.Domain.Entities { public class CustomServerInformation { diff --git a/Wino.Core.Domain/Entities/MailAccount.cs b/Wino.Core.Domain/Entities/MailAccount.cs index dbeac65c..48cbfbfd 100644 --- a/Wino.Core.Domain/Entities/MailAccount.cs +++ b/Wino.Core.Domain/Entities/MailAccount.cs @@ -1,8 +1,8 @@ using System; using SQLite; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Entities +namespace Wino.Domain.Entities { public class MailAccount { diff --git a/Wino.Core.Domain/Entities/MailAccountPreferences.cs b/Wino.Core.Domain/Entities/MailAccountPreferences.cs index ba14a98d..e794b8a5 100644 --- a/Wino.Core.Domain/Entities/MailAccountPreferences.cs +++ b/Wino.Core.Domain/Entities/MailAccountPreferences.cs @@ -1,7 +1,7 @@ using System; using SQLite; -namespace Wino.Core.Domain.Entities +namespace Wino.Domain.Entities { public class MailAccountPreferences { diff --git a/Wino.Core.Domain/Entities/MailCopy.cs b/Wino.Core.Domain/Entities/MailCopy.cs index 489bc916..bc530be0 100644 --- a/Wino.Core.Domain/Entities/MailCopy.cs +++ b/Wino.Core.Domain/Entities/MailCopy.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using SQLite; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Enums; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Entities +namespace Wino.Domain.Entities { /// /// Summary of the parsed MIME messages. diff --git a/Wino.Core.Domain/Entities/MailItemFolder.cs b/Wino.Core.Domain/Entities/MailItemFolder.cs index 30a24ca6..c5424657 100644 --- a/Wino.Core.Domain/Entities/MailItemFolder.cs +++ b/Wino.Core.Domain/Entities/MailItemFolder.cs @@ -2,10 +2,11 @@ using System.Collections.Generic; using System.Diagnostics; using SQLite; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain; +using Wino.Domain.Enums; +using Wino.Domain.Models.Folders; -namespace Wino.Core.Domain.Entities +namespace Wino.Domain.Entities { [DebuggerDisplay("{FolderName} - {SpecialFolderType}")] public class MailItemFolder : IMailItemFolder diff --git a/Wino.Core.Domain/Entities/MergedInbox.cs b/Wino.Core.Domain/Entities/MergedInbox.cs index b9d0a58a..2faec4de 100644 --- a/Wino.Core.Domain/Entities/MergedInbox.cs +++ b/Wino.Core.Domain/Entities/MergedInbox.cs @@ -1,7 +1,7 @@ using System; using SQLite; -namespace Wino.Core.Domain.Entities +namespace Wino.Domain.Entities { public class MergedInbox { diff --git a/Wino.Core.Domain/Entities/SystemFolderConfiguration.cs b/Wino.Core.Domain/Entities/SystemFolderConfiguration.cs index b4c532d1..2f50134a 100644 --- a/Wino.Core.Domain/Entities/SystemFolderConfiguration.cs +++ b/Wino.Core.Domain/Entities/SystemFolderConfiguration.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Wino.Core.Domain.Entities +namespace Wino.Domain.Entities { public record SystemFolderConfiguration(MailItemFolder SentFolder, MailItemFolder DraftFolder, diff --git a/Wino.Core.Domain/Entities/TokenInformation.cs b/Wino.Core.Domain/Entities/TokenInformation.cs index 88bf292c..a5760682 100644 --- a/Wino.Core.Domain/Entities/TokenInformation.cs +++ b/Wino.Core.Domain/Entities/TokenInformation.cs @@ -1,8 +1,8 @@ using System; using SQLite; -using Wino.Core.Domain.Models.Authentication; +using Wino.Domain.Models.Authentication; -namespace Wino.Core.Domain.Entities +namespace Wino.Domain.Entities { public class TokenInformation : TokenInformationBase { diff --git a/Wino.Core.Domain/Enums/AccountAttentionReason.cs b/Wino.Core.Domain/Enums/AccountAttentionReason.cs index b192e74f..3fdd9d46 100644 --- a/Wino.Core.Domain/Enums/AccountAttentionReason.cs +++ b/Wino.Core.Domain/Enums/AccountAttentionReason.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum AccountAttentionReason { diff --git a/Wino.Core.Domain/Enums/AccountCreationDialogState.cs b/Wino.Core.Domain/Enums/AccountCreationDialogState.cs index af724f47..da6a0595 100644 --- a/Wino.Core.Domain/Enums/AccountCreationDialogState.cs +++ b/Wino.Core.Domain/Enums/AccountCreationDialogState.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum AccountCreationDialogState { diff --git a/Wino.Core.Domain/Enums/AccountSynchronizerState.cs b/Wino.Core.Domain/Enums/AccountSynchronizerState.cs index 9a9e0810..bd38cdbd 100644 --- a/Wino.Core.Domain/Enums/AccountSynchronizerState.cs +++ b/Wino.Core.Domain/Enums/AccountSynchronizerState.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { /// /// Indicates the state of synchronizer. diff --git a/Wino.Core.Domain/Enums/AppLanguage.cs b/Wino.Core.Domain/Enums/AppLanguage.cs index d7b90266..fb111070 100644 --- a/Wino.Core.Domain/Enums/AppLanguage.cs +++ b/Wino.Core.Domain/Enums/AppLanguage.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum AppLanguage { diff --git a/Wino.Core.Domain/Enums/AppThemeType.cs b/Wino.Core.Domain/Enums/AppThemeType.cs index 138f499b..1494243f 100644 --- a/Wino.Core.Domain/Enums/AppThemeType.cs +++ b/Wino.Core.Domain/Enums/AppThemeType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum AppThemeType { diff --git a/Wino.Core.Domain/Enums/ApplicationElementTheme.cs b/Wino.Core.Domain/Enums/ApplicationElementTheme.cs index 6c3e0bca..4d4e5275 100644 --- a/Wino.Core.Domain/Enums/ApplicationElementTheme.cs +++ b/Wino.Core.Domain/Enums/ApplicationElementTheme.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum ApplicationElementTheme { diff --git a/Wino.Core.Domain/Enums/BackgroundSynchronizationReason.cs b/Wino.Core.Domain/Enums/BackgroundSynchronizationReason.cs index eac0a746..2cffc2b4 100644 --- a/Wino.Core.Domain/Enums/BackgroundSynchronizationReason.cs +++ b/Wino.Core.Domain/Enums/BackgroundSynchronizationReason.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum BackgroundSynchronizationReason { diff --git a/Wino.Core.Domain/Enums/ChangeRequestType.cs b/Wino.Core.Domain/Enums/ChangeRequestType.cs index d0af1669..a265d5df 100644 --- a/Wino.Core.Domain/Enums/ChangeRequestType.cs +++ b/Wino.Core.Domain/Enums/ChangeRequestType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum ChangeRequestType { diff --git a/Wino.Core.Domain/Enums/CustomIncomingServerType.cs b/Wino.Core.Domain/Enums/CustomIncomingServerType.cs index 40312e4a..b88fbbfd 100644 --- a/Wino.Core.Domain/Enums/CustomIncomingServerType.cs +++ b/Wino.Core.Domain/Enums/CustomIncomingServerType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum CustomIncomingServerType { diff --git a/Wino.Core.Domain/Enums/DraftCreationReason.cs b/Wino.Core.Domain/Enums/DraftCreationReason.cs index e988c03a..6555aa68 100644 --- a/Wino.Core.Domain/Enums/DraftCreationReason.cs +++ b/Wino.Core.Domain/Enums/DraftCreationReason.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum DraftCreationReason { diff --git a/Wino.Core.Domain/Enums/EditorToolbarSectionType.cs b/Wino.Core.Domain/Enums/EditorToolbarSectionType.cs index 187c8cb2..9409525b 100644 --- a/Wino.Core.Domain/Enums/EditorToolbarSectionType.cs +++ b/Wino.Core.Domain/Enums/EditorToolbarSectionType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum EditorToolbarSectionType { diff --git a/Wino.Core.Domain/Enums/FilterOptionType.cs b/Wino.Core.Domain/Enums/FilterOptionType.cs index 02bf14ff..6b2d3ad2 100644 --- a/Wino.Core.Domain/Enums/FilterOptionType.cs +++ b/Wino.Core.Domain/Enums/FilterOptionType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum FilterOptionType { diff --git a/Wino.Core.Domain/Enums/FolderOperation.cs b/Wino.Core.Domain/Enums/FolderOperation.cs index 2d33144f..301ef391 100644 --- a/Wino.Core.Domain/Enums/FolderOperation.cs +++ b/Wino.Core.Domain/Enums/FolderOperation.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { /// /// Defines all possible folder operations that can be done. diff --git a/Wino.Core.Domain/Enums/ImapAuthenticationMethod.cs b/Wino.Core.Domain/Enums/ImapAuthenticationMethod.cs index 4390f247..d446992d 100644 --- a/Wino.Core.Domain/Enums/ImapAuthenticationMethod.cs +++ b/Wino.Core.Domain/Enums/ImapAuthenticationMethod.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum ImapAuthenticationMethod { diff --git a/Wino.Core.Domain/Enums/ImapConnectionSecurity.cs b/Wino.Core.Domain/Enums/ImapConnectionSecurity.cs index 9a3e6e7b..56ba2803 100644 --- a/Wino.Core.Domain/Enums/ImapConnectionSecurity.cs +++ b/Wino.Core.Domain/Enums/ImapConnectionSecurity.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum ImapConnectionSecurity { diff --git a/Wino.Core.Domain/Enums/InfoBarAnimationType.cs b/Wino.Core.Domain/Enums/InfoBarAnimationType.cs index 488b667b..3834dd9b 100644 --- a/Wino.Core.Domain/Enums/InfoBarAnimationType.cs +++ b/Wino.Core.Domain/Enums/InfoBarAnimationType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum InfoBarAnimationType { diff --git a/Wino.Core.Domain/Enums/InfoBarMessageType.cs b/Wino.Core.Domain/Enums/InfoBarMessageType.cs index 15df6dcf..755559d7 100644 --- a/Wino.Core.Domain/Enums/InfoBarMessageType.cs +++ b/Wino.Core.Domain/Enums/InfoBarMessageType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum InfoBarMessageType { diff --git a/Wino.Core.Domain/Enums/MailAttachmentType.cs b/Wino.Core.Domain/Enums/MailAttachmentType.cs index b444b4c5..58b71302 100644 --- a/Wino.Core.Domain/Enums/MailAttachmentType.cs +++ b/Wino.Core.Domain/Enums/MailAttachmentType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum MailAttachmentType { diff --git a/Wino.Core.Domain/Enums/MailImportance.cs b/Wino.Core.Domain/Enums/MailImportance.cs index 22f2a6ab..f9f2ef72 100644 --- a/Wino.Core.Domain/Enums/MailImportance.cs +++ b/Wino.Core.Domain/Enums/MailImportance.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum MailImportance { diff --git a/Wino.Core.Domain/Enums/MailListDisplayMode.cs b/Wino.Core.Domain/Enums/MailListDisplayMode.cs index d27278e7..c014f317 100644 --- a/Wino.Core.Domain/Enums/MailListDisplayMode.cs +++ b/Wino.Core.Domain/Enums/MailListDisplayMode.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum MailListDisplayMode { diff --git a/Wino.Core.Domain/Enums/MailMarkAsOption.cs b/Wino.Core.Domain/Enums/MailMarkAsOption.cs index e08ce803..62b25e1c 100644 --- a/Wino.Core.Domain/Enums/MailMarkAsOption.cs +++ b/Wino.Core.Domain/Enums/MailMarkAsOption.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum MailMarkAsOption { diff --git a/Wino.Core.Domain/Enums/MailOperation.cs b/Wino.Core.Domain/Enums/MailOperation.cs index 0d9962cd..2800b98c 100644 --- a/Wino.Core.Domain/Enums/MailOperation.cs +++ b/Wino.Core.Domain/Enums/MailOperation.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { // Synchronizer requests. public enum MailSynchronizerOperation diff --git a/Wino.Core.Domain/Enums/MailProviderType.cs b/Wino.Core.Domain/Enums/MailProviderType.cs index a9156f68..44ec037d 100644 --- a/Wino.Core.Domain/Enums/MailProviderType.cs +++ b/Wino.Core.Domain/Enums/MailProviderType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum MailProviderType { diff --git a/Wino.Core.Domain/Enums/MenuPaneMode.cs b/Wino.Core.Domain/Enums/MenuPaneMode.cs index 3d6e77b8..29d5bb8a 100644 --- a/Wino.Core.Domain/Enums/MenuPaneMode.cs +++ b/Wino.Core.Domain/Enums/MenuPaneMode.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum MenuPaneMode { diff --git a/Wino.Core.Domain/Enums/NavigationReferenceFrame.cs b/Wino.Core.Domain/Enums/NavigationReferenceFrame.cs index 1d116fdb..4b3ab738 100644 --- a/Wino.Core.Domain/Enums/NavigationReferenceFrame.cs +++ b/Wino.Core.Domain/Enums/NavigationReferenceFrame.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum NavigationReferenceFrame { diff --git a/Wino.Core.Domain/Enums/PickFolderReason.cs b/Wino.Core.Domain/Enums/PickFolderReason.cs index 99067066..74b2de52 100644 --- a/Wino.Core.Domain/Enums/PickFolderReason.cs +++ b/Wino.Core.Domain/Enums/PickFolderReason.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { /// /// Defines the potential reasons for picking folder in the folder picking dialog. diff --git a/Wino.Core.Domain/Enums/ReaderFont.cs b/Wino.Core.Domain/Enums/ReaderFont.cs index 53c0e39a..bc7aa55f 100644 --- a/Wino.Core.Domain/Enums/ReaderFont.cs +++ b/Wino.Core.Domain/Enums/ReaderFont.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum ReaderFont { diff --git a/Wino.Core.Domain/Enums/SortingOptionType.cs b/Wino.Core.Domain/Enums/SortingOptionType.cs index 4a88d2fd..c10e1c67 100644 --- a/Wino.Core.Domain/Enums/SortingOptionType.cs +++ b/Wino.Core.Domain/Enums/SortingOptionType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum SortingOptionType { diff --git a/Wino.Core.Domain/Enums/SpecialFolderType.cs b/Wino.Core.Domain/Enums/SpecialFolderType.cs index b26ae4c3..08ec53d2 100644 --- a/Wino.Core.Domain/Enums/SpecialFolderType.cs +++ b/Wino.Core.Domain/Enums/SpecialFolderType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum SpecialFolderType { diff --git a/Wino.Core.Domain/Enums/StorePurchaseResult.cs b/Wino.Core.Domain/Enums/StorePurchaseResult.cs index 8364b81a..47199c34 100644 --- a/Wino.Core.Domain/Enums/StorePurchaseResult.cs +++ b/Wino.Core.Domain/Enums/StorePurchaseResult.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { // From the SDK. public enum StorePurchaseResult diff --git a/Wino.Core.Domain/Enums/SynchronizationCompletedState.cs b/Wino.Core.Domain/Enums/SynchronizationCompletedState.cs index b4376afe..2d431e3a 100644 --- a/Wino.Core.Domain/Enums/SynchronizationCompletedState.cs +++ b/Wino.Core.Domain/Enums/SynchronizationCompletedState.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum SynchronizationCompletedState { diff --git a/Wino.Core.Domain/Enums/SynchronizationType.cs b/Wino.Core.Domain/Enums/SynchronizationType.cs index c95b7d52..639e4201 100644 --- a/Wino.Core.Domain/Enums/SynchronizationType.cs +++ b/Wino.Core.Domain/Enums/SynchronizationType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum SynchronizationType { diff --git a/Wino.Core.Domain/Enums/WinoPage.cs b/Wino.Core.Domain/Enums/WinoPage.cs index e6ff92c5..591e8ab6 100644 --- a/Wino.Core.Domain/Enums/WinoPage.cs +++ b/Wino.Core.Domain/Enums/WinoPage.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { /// /// All registered views. diff --git a/Wino.Core.Domain/Enums/WinoServerConnectionStatus.cs b/Wino.Core.Domain/Enums/WinoServerConnectionStatus.cs index e997ce4b..68ce2568 100644 --- a/Wino.Core.Domain/Enums/WinoServerConnectionStatus.cs +++ b/Wino.Core.Domain/Enums/WinoServerConnectionStatus.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Enums +namespace Wino.Domain.Enums { public enum WinoServerConnectionStatus { diff --git a/Wino.Core.Domain/Exceptions/AccountSetupCanceledException.cs b/Wino.Core.Domain/Exceptions/AccountSetupCanceledException.cs index 03819076..2e4b9128 100644 --- a/Wino.Core.Domain/Exceptions/AccountSetupCanceledException.cs +++ b/Wino.Core.Domain/Exceptions/AccountSetupCanceledException.cs @@ -1,6 +1,6 @@ -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { - public class AccountSetupCanceledException : System.Exception + public class AccountSetupCanceledException : Exception { } diff --git a/Wino.Core.Domain/Exceptions/AuthenticationAttentionException.cs b/Wino.Core.Domain/Exceptions/AuthenticationAttentionException.cs index 63b577f8..67b8ae06 100644 --- a/Wino.Core.Domain/Exceptions/AuthenticationAttentionException.cs +++ b/Wino.Core.Domain/Exceptions/AuthenticationAttentionException.cs @@ -1,7 +1,7 @@ using System; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { /// /// Thrown when IAuthenticator requires user interaction to fix authentication issues. diff --git a/Wino.Core.Domain/Exceptions/AuthenticationException.cs b/Wino.Core.Domain/Exceptions/AuthenticationException.cs index 87e622df..5ba7afef 100644 --- a/Wino.Core.Domain/Exceptions/AuthenticationException.cs +++ b/Wino.Core.Domain/Exceptions/AuthenticationException.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { /// /// All exceptions related to authentication. diff --git a/Wino.Core.Domain/Exceptions/BackgroundTaskExecutionRequestDeniedException.cs b/Wino.Core.Domain/Exceptions/BackgroundTaskExecutionRequestDeniedException.cs index 532addbd..743949f2 100644 --- a/Wino.Core.Domain/Exceptions/BackgroundTaskExecutionRequestDeniedException.cs +++ b/Wino.Core.Domain/Exceptions/BackgroundTaskExecutionRequestDeniedException.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { /// /// An exception thrown when the background task execution policies are denied for some reason. diff --git a/Wino.Core.Domain/Exceptions/BackgroundTaskRegistrationFailedException.cs b/Wino.Core.Domain/Exceptions/BackgroundTaskRegistrationFailedException.cs index 50d3d40d..541f0bd3 100644 --- a/Wino.Core.Domain/Exceptions/BackgroundTaskRegistrationFailedException.cs +++ b/Wino.Core.Domain/Exceptions/BackgroundTaskRegistrationFailedException.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { /// /// An exception thrown when the background task registration is failed. diff --git a/Wino.Core.Domain/Exceptions/ComposerMimeNotFoundException.cs b/Wino.Core.Domain/Exceptions/ComposerMimeNotFoundException.cs index 2a82d580..afb56acf 100644 --- a/Wino.Core.Domain/Exceptions/ComposerMimeNotFoundException.cs +++ b/Wino.Core.Domain/Exceptions/ComposerMimeNotFoundException.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { /// /// Thrown when composer cant find the mime to load. diff --git a/Wino.Core.Domain/Exceptions/CustomThemeCreationFailedException.cs b/Wino.Core.Domain/Exceptions/CustomThemeCreationFailedException.cs index 8ffd3992..88b234d4 100644 --- a/Wino.Core.Domain/Exceptions/CustomThemeCreationFailedException.cs +++ b/Wino.Core.Domain/Exceptions/CustomThemeCreationFailedException.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { public class CustomThemeCreationFailedException : Exception { diff --git a/Wino.Core.Domain/Exceptions/GoogleAuthenticationException.cs b/Wino.Core.Domain/Exceptions/GoogleAuthenticationException.cs index 71d244c1..54152a7d 100644 --- a/Wino.Core.Domain/Exceptions/GoogleAuthenticationException.cs +++ b/Wino.Core.Domain/Exceptions/GoogleAuthenticationException.cs @@ -1,6 +1,6 @@ -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { - public class GoogleAuthenticationException : System.Exception + public class GoogleAuthenticationException : Exception { public GoogleAuthenticationException(string message) : base(message) { } } diff --git a/Wino.Core.Domain/Exceptions/ImapClientPoolException.cs b/Wino.Core.Domain/Exceptions/ImapClientPoolException.cs index 41226041..ddaad5ce 100644 --- a/Wino.Core.Domain/Exceptions/ImapClientPoolException.cs +++ b/Wino.Core.Domain/Exceptions/ImapClientPoolException.cs @@ -1,6 +1,4 @@ -using System; - -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { public class ImapClientPoolException : Exception { diff --git a/Wino.Core.Domain/Exceptions/ImapConnectionFailedPackage.cs b/Wino.Core.Domain/Exceptions/ImapConnectionFailedPackage.cs index f33e775e..397e3e1d 100644 --- a/Wino.Core.Domain/Exceptions/ImapConnectionFailedPackage.cs +++ b/Wino.Core.Domain/Exceptions/ImapConnectionFailedPackage.cs @@ -1,7 +1,7 @@ using System; -using Wino.Core.Domain.Models.AutoDiscovery; +using Wino.Domain.Models.AutoDiscovery; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { public class ImapConnectionFailedPackage { diff --git a/Wino.Core.Domain/Exceptions/InvalidMoveTargetException.cs b/Wino.Core.Domain/Exceptions/InvalidMoveTargetException.cs index 05f3e7b4..cebb1d09 100644 --- a/Wino.Core.Domain/Exceptions/InvalidMoveTargetException.cs +++ b/Wino.Core.Domain/Exceptions/InvalidMoveTargetException.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { public class InvalidMoveTargetException : Exception { } } diff --git a/Wino.Core.Domain/Exceptions/SynchronizerEntityNotFoundException.cs b/Wino.Core.Domain/Exceptions/SynchronizerEntityNotFoundException.cs index 4d35aad6..4d0c70e6 100644 --- a/Wino.Core.Domain/Exceptions/SynchronizerEntityNotFoundException.cs +++ b/Wino.Core.Domain/Exceptions/SynchronizerEntityNotFoundException.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { public class SynchronizerEntityNotFoundException : Exception { diff --git a/Wino.Core.Domain/Exceptions/SynchronizerException.cs b/Wino.Core.Domain/Exceptions/SynchronizerException.cs index cd2960fb..1a593355 100644 --- a/Wino.Core.Domain/Exceptions/SynchronizerException.cs +++ b/Wino.Core.Domain/Exceptions/SynchronizerException.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { public class SynchronizerException : Exception { diff --git a/Wino.Core.Domain/Exceptions/SystemFolderConfigurationMissingException.cs b/Wino.Core.Domain/Exceptions/SystemFolderConfigurationMissingException.cs index 918aa253..439b474a 100644 --- a/Wino.Core.Domain/Exceptions/SystemFolderConfigurationMissingException.cs +++ b/Wino.Core.Domain/Exceptions/SystemFolderConfigurationMissingException.cs @@ -1,7 +1,7 @@ -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { /// /// When IMAP account's system folder configuration setup is not done yet. /// - public class SystemFolderConfigurationMissingException : System.Exception { } + public class SystemFolderConfigurationMissingException : Exception { } } diff --git a/Wino.Core.Domain/Exceptions/UnavailableSpecialFolderException.cs b/Wino.Core.Domain/Exceptions/UnavailableSpecialFolderException.cs index 9153cbaa..4bbc52cf 100644 --- a/Wino.Core.Domain/Exceptions/UnavailableSpecialFolderException.cs +++ b/Wino.Core.Domain/Exceptions/UnavailableSpecialFolderException.cs @@ -1,7 +1,7 @@ using System; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Exceptions +namespace Wino.Domain.Exceptions { /// /// Emitted when special folder is needed for an operation but it couldn't be found. diff --git a/Wino.Core/Extensions/LongExtensions.cs b/Wino.Core.Domain/Extensions/LongExtensions.cs similarity index 78% rename from Wino.Core/Extensions/LongExtensions.cs rename to Wino.Core.Domain/Extensions/LongExtensions.cs index 2fa1198f..29bd81a1 100644 --- a/Wino.Core/Extensions/LongExtensions.cs +++ b/Wino.Core.Domain/Extensions/LongExtensions.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Wino.Core.Extensions +namespace Wino.Domain.Extensions { public static class LongExtensions { @@ -11,34 +7,34 @@ namespace Wino.Core.Extensions public static string GetBytesReadable(this long i) { // Get absolute value - long absolute_i = (i < 0 ? -i : i); + long absolute_i = i < 0 ? -i : i; // Determine the suffix and readable value string suffix; double readable; if (absolute_i >= 0x1000000000000000) // Exabyte { suffix = "EB"; - readable = (i >> 50); + readable = i >> 50; } else if (absolute_i >= 0x4000000000000) // Petabyte { suffix = "PB"; - readable = (i >> 40); + readable = i >> 40; } else if (absolute_i >= 0x10000000000) // Terabyte { suffix = "TB"; - readable = (i >> 30); + readable = i >> 30; } else if (absolute_i >= 0x40000000) // Gigabyte { suffix = "GB"; - readable = (i >> 20); + readable = i >> 20; } else if (absolute_i >= 0x100000) // Megabyte { suffix = "MB"; - readable = (i >> 10); + readable = i >> 10; } else if (absolute_i >= 0x400) // Kilobyte { @@ -50,7 +46,7 @@ namespace Wino.Core.Extensions return i.ToString("0 B"); // Byte } // Divide by 1024 to get fractional value - readable = (readable / 1024); + readable = readable / 1024; // Return formatted number with suffix return readable.ToString("0.# ") + suffix; } diff --git a/Wino.Core.Domain/Extensions/MailkitClientExtensions.cs b/Wino.Core.Domain/Extensions/MailkitClientExtensions.cs new file mode 100644 index 00000000..329b8708 --- /dev/null +++ b/Wino.Core.Domain/Extensions/MailkitClientExtensions.cs @@ -0,0 +1,14 @@ +namespace Wino.Domain.Extensions +{ + public static class MailkitClientExtensions + { + public static uint ResolveUid(string mailCopyId) + { + var splitted = mailCopyId.Split(Constants.MailCopyUidSeparator); + + if (splitted.Length > 1 && uint.TryParse(splitted[1], out uint parsedUint)) return parsedUint; + + throw new ArgumentOutOfRangeException(nameof(mailCopyId), mailCopyId, "Invalid mailCopyId format."); + } + } +} diff --git a/Wino.Core.Domain/Extensions/MimeExtensions.cs b/Wino.Core.Domain/Extensions/MimeExtensions.cs new file mode 100644 index 00000000..8215c50d --- /dev/null +++ b/Wino.Core.Domain/Extensions/MimeExtensions.cs @@ -0,0 +1,22 @@ +using MimeKit; +using Wino.Domain; +using Wino.Domain.Entities; + +namespace Wino.Domain.Extensions +{ + public static class MimeExtensions + { + + + public static AddressInformation ToAddressInformation(this MailboxAddress address) + { + if (address == null) + return new AddressInformation() { Name = Translator.UnknownSender, Address = Translator.UnknownAddress }; + + if (string.IsNullOrEmpty(address.Name)) + address.Name = address.Address; + + return new AddressInformation() { Name = address.Name, Address = address.Address }; + } + } +} diff --git a/Wino.Core.Domain/Interfaces/AfterRequestExecutionSynchronizationInterfaces.cs b/Wino.Core.Domain/Interfaces/AfterRequestExecutionSynchronizationInterfaces.cs index b1784d08..c370fb0a 100644 --- a/Wino.Core.Domain/Interfaces/AfterRequestExecutionSynchronizationInterfaces.cs +++ b/Wino.Core.Domain/Interfaces/AfterRequestExecutionSynchronizationInterfaces.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { /// /// An interface that should force synchronizer to do synchronization for only given folder ids diff --git a/Wino.Core.Domain/Interfaces/IAccountCreationDialog.cs b/Wino.Core.Domain/Interfaces/IAccountCreationDialog.cs index c74a8413..06a2d352 100644 --- a/Wino.Core.Domain/Interfaces/IAccountCreationDialog.cs +++ b/Wino.Core.Domain/Interfaces/IAccountCreationDialog.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IAccountCreationDialog { diff --git a/Wino.Core.Domain/Interfaces/IAccountMenuItem.cs b/Wino.Core.Domain/Interfaces/IAccountMenuItem.cs index 23fce0c1..48c0dded 100644 --- a/Wino.Core.Domain/Interfaces/IAccountMenuItem.cs +++ b/Wino.Core.Domain/Interfaces/IAccountMenuItem.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IAccountMenuItem : IMenuItem { diff --git a/Wino.Core.Domain/Interfaces/IAccountPickerDialog.cs b/Wino.Core.Domain/Interfaces/IAccountPickerDialog.cs index a43bbc26..b022c6b6 100644 --- a/Wino.Core.Domain/Interfaces/IAccountPickerDialog.cs +++ b/Wino.Core.Domain/Interfaces/IAccountPickerDialog.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IAccountPickerDialog { diff --git a/Wino.Core.Domain/Interfaces/IAccountProviderDetailViewModel.cs b/Wino.Core.Domain/Interfaces/IAccountProviderDetailViewModel.cs index d4a9b279..c6e37074 100644 --- a/Wino.Core.Domain/Interfaces/IAccountProviderDetailViewModel.cs +++ b/Wino.Core.Domain/Interfaces/IAccountProviderDetailViewModel.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IAccountProviderDetailViewModel { diff --git a/Wino.Core.Domain/Interfaces/IAccountProviderDetails.cs b/Wino.Core.Domain/Interfaces/IAccountProviderDetails.cs index 65d0d5b7..a2070f49 100644 --- a/Wino.Core.Domain/Interfaces/IAccountProviderDetails.cs +++ b/Wino.Core.Domain/Interfaces/IAccountProviderDetails.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IAccountProviderDetails { diff --git a/Wino.Core.Domain/Interfaces/IAccountService.cs b/Wino.Core.Domain/Interfaces/IAccountService.cs index 78682cda..9c9870d1 100644 --- a/Wino.Core.Domain/Interfaces/IAccountService.cs +++ b/Wino.Core.Domain/Interfaces/IAccountService.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IAccountService { diff --git a/Wino.Core.Domain/Interfaces/IApplicationConfiguration.cs b/Wino.Core.Domain/Interfaces/IApplicationConfiguration.cs index 4a9aca60..db7ce60e 100644 --- a/Wino.Core.Domain/Interfaces/IApplicationConfiguration.cs +++ b/Wino.Core.Domain/Interfaces/IApplicationConfiguration.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { /// /// Singleton object that holds the application data folder path and the publisher shared folder path. diff --git a/Wino.Core.Domain/Interfaces/IApplicationResourceManager.cs b/Wino.Core.Domain/Interfaces/IApplicationResourceManager.cs index 8024c5d1..1bb8f042 100644 --- a/Wino.Core.Domain/Interfaces/IApplicationResourceManager.cs +++ b/Wino.Core.Domain/Interfaces/IApplicationResourceManager.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IApplicationResourceManager { diff --git a/Wino.Core.Domain/Interfaces/IAuthenticationProvider.cs b/Wino.Core.Domain/Interfaces/IAuthenticationProvider.cs index 49390dcb..fcf016e3 100644 --- a/Wino.Core.Domain/Interfaces/IAuthenticationProvider.cs +++ b/Wino.Core.Domain/Interfaces/IAuthenticationProvider.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IAuthenticationProvider { diff --git a/Wino.Core.Domain/Interfaces/IAuthenticator.cs b/Wino.Core.Domain/Interfaces/IAuthenticator.cs index ced495d6..e73e9672 100644 --- a/Wino.Core.Domain/Interfaces/IAuthenticator.cs +++ b/Wino.Core.Domain/Interfaces/IAuthenticator.cs @@ -1,9 +1,9 @@ using System; using System.Threading.Tasks; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; +using Wino.Domain.Entities; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IAuthenticator { diff --git a/Wino.Core.Domain/Interfaces/IAutoDiscoveryService.cs b/Wino.Core.Domain/Interfaces/IAutoDiscoveryService.cs index 6886022d..b2a1b7dd 100644 --- a/Wino.Core.Domain/Interfaces/IAutoDiscoveryService.cs +++ b/Wino.Core.Domain/Interfaces/IAutoDiscoveryService.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using Wino.Core.Domain.Models.AutoDiscovery; +using Wino.Domain.Models.AutoDiscovery; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { /// /// Searches for Auto Discovery settings for custom mail accounts. diff --git a/Wino.Core.Domain/Interfaces/IBaseSynchronizer.cs b/Wino.Core.Domain/Interfaces/IBaseSynchronizer.cs index 21ca1f8a..0ad4e356 100644 --- a/Wino.Core.Domain/Interfaces/IBaseSynchronizer.cs +++ b/Wino.Core.Domain/Interfaces/IBaseSynchronizer.cs @@ -1,12 +1,12 @@ using System.Threading; using System.Threading.Tasks; using MailKit; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Synchronization; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Synchronization; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IBaseSynchronizer { diff --git a/Wino.Core.Domain/Interfaces/IClipboardService.cs b/Wino.Core.Domain/Interfaces/IClipboardService.cs index f5bb4782..4518b42a 100644 --- a/Wino.Core.Domain/Interfaces/IClipboardService.cs +++ b/Wino.Core.Domain/Interfaces/IClipboardService.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IClipboardService { diff --git a/Wino.Core.Domain/Interfaces/IConfigurationService.cs b/Wino.Core.Domain/Interfaces/IConfigurationService.cs index c08c463c..3a007c36 100644 --- a/Wino.Core.Domain/Interfaces/IConfigurationService.cs +++ b/Wino.Core.Domain/Interfaces/IConfigurationService.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IConfigurationService { diff --git a/Wino.Core.Domain/Interfaces/IConfirmationDialog.cs b/Wino.Core.Domain/Interfaces/IConfirmationDialog.cs index 34630448..327f11de 100644 --- a/Wino.Core.Domain/Interfaces/IConfirmationDialog.cs +++ b/Wino.Core.Domain/Interfaces/IConfirmationDialog.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IConfirmationDialog { diff --git a/Wino.Core.Domain/Interfaces/IContactService.cs b/Wino.Core.Domain/Interfaces/IContactService.cs new file mode 100644 index 00000000..e2b3084b --- /dev/null +++ b/Wino.Core.Domain/Interfaces/IContactService.cs @@ -0,0 +1,12 @@ +using MimeKit; +using Wino.Domain.Entities; + +namespace Wino.Domain.Interfaces +{ + public interface IContactService + { + Task> GetAddressInformationAsync(string queryText); + Task GetAddressInformationByAddressAsync(string address); + Task SaveAddressInformationAsync(MimeMessage message); + } +} diff --git a/Wino.Core.Domain/Interfaces/IContextMenuItemService.cs b/Wino.Core.Domain/Interfaces/IContextMenuItemService.cs index 06d91240..d36f0a6e 100644 --- a/Wino.Core.Domain/Interfaces/IContextMenuItemService.cs +++ b/Wino.Core.Domain/Interfaces/IContextMenuItemService.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Menus; +using Wino.Domain.Models.Folders; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Menus; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IContextMenuItemService { diff --git a/Wino.Core.Domain/Interfaces/IContextMenuProvider.cs b/Wino.Core.Domain/Interfaces/IContextMenuProvider.cs index 968b2c2c..5973ad67 100644 --- a/Wino.Core.Domain/Interfaces/IContextMenuProvider.cs +++ b/Wino.Core.Domain/Interfaces/IContextMenuProvider.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Menus; +using Wino.Domain.Models.Folders; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Menus; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IContextMenuProvider { diff --git a/Wino.Core.Domain/Interfaces/ICustomServerAccountCreationDialog.cs b/Wino.Core.Domain/Interfaces/ICustomServerAccountCreationDialog.cs index c133a1db..699a945a 100644 --- a/Wino.Core.Domain/Interfaces/ICustomServerAccountCreationDialog.cs +++ b/Wino.Core.Domain/Interfaces/ICustomServerAccountCreationDialog.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface ICustomServerAccountCreationDialog : IAccountCreationDialog { diff --git a/Wino.Core.Domain/Interfaces/IDatabaseService.cs b/Wino.Core.Domain/Interfaces/IDatabaseService.cs new file mode 100644 index 00000000..e335da2b --- /dev/null +++ b/Wino.Core.Domain/Interfaces/IDatabaseService.cs @@ -0,0 +1,9 @@ +using SQLite; + +namespace Wino.Domain.Interfaces +{ + public interface IDatabaseService : IInitializeAsync + { + SQLiteAsyncConnection Connection { get; } + } +} diff --git a/Wino.Core.Domain/Interfaces/IDefaultChangeProcessor.cs b/Wino.Core.Domain/Interfaces/IDefaultChangeProcessor.cs new file mode 100644 index 00000000..80eaaef8 --- /dev/null +++ b/Wino.Core.Domain/Interfaces/IDefaultChangeProcessor.cs @@ -0,0 +1,44 @@ +using MimeKit; +using Wino.Domain.Entities; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Synchronization; + +namespace Wino.Domain.Interfaces +{ + /// + /// Database change processor that handles common operations for all synchronizers. + /// When a synchronizer detects a change, it should call the appropriate method in this class to reflect the change in the database. + /// Different synchronizers might need additional implementations. + /// , and + /// None of the synchronizers can directly change anything in the database. + /// + public interface IDefaultChangeProcessor + { + Task UpdateAccountDeltaSynchronizationIdentifierAsync(Guid accountId, string deltaSynchronizationIdentifier); + Task CreateAssignmentAsync(Guid accountId, string mailCopyId, string remoteFolderId); + Task DeleteAssignmentAsync(Guid accountId, string mailCopyId, string remoteFolderId); + Task ChangeMailReadStatusAsync(string mailCopyId, bool isRead); + Task ChangeFlagStatusAsync(string mailCopyId, bool isFlagged); + Task CreateMailAsync(Guid AccountId, NewMailItemPackage package); + Task DeleteMailAsync(Guid accountId, string mailId); + Task> GetDownloadedUnreadMailsAsync(Guid accountId, IEnumerable downloadedMailCopyIds); + Task SaveMimeFileAsync(Guid fileId, MimeMessage mimeMessage, Guid accountId); + Task DeleteFolderAsync(Guid accountId, string remoteFolderId); + Task InsertFolderAsync(MailItemFolder folder); + Task UpdateFolderAsync(MailItemFolder folder); + + /// + /// Returns the list of folders that are available for account. + /// + /// Account id to get folders for. + /// All folders. + Task> GetLocalFoldersAsync(Guid accountId); + + Task> GetSynchronizationFoldersAsync(SynchronizationOptions options); + + Task MapLocalDraftAsync(Guid accountId, Guid localDraftCopyUniqueId, string newMailCopyId, string newDraftId, string newThreadId); + Task UpdateFolderLastSyncDateAsync(Guid folderId); + + Task> GetExistingFoldersAsync(Guid accountId); + } +} diff --git a/Wino.Core.Domain/Interfaces/IDialogService.cs b/Wino.Core.Domain/Interfaces/IDialogService.cs index a2986bd9..522c3bb0 100644 --- a/Wino.Core.Domain/Interfaces/IDialogService.cs +++ b/Wino.Core.Domain/Interfaces/IDialogService.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Threading.Tasks; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Accounts; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Models.Accounts; +using Wino.Domain.Models.Folders; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IDialogService { diff --git a/Wino.Core.Domain/Interfaces/IDispatcher.cs b/Wino.Core.Domain/Interfaces/IDispatcher.cs index 0eb9f08b..0a7da55f 100644 --- a/Wino.Core.Domain/Interfaces/IDispatcher.cs +++ b/Wino.Core.Domain/Interfaces/IDispatcher.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IDispatcher { diff --git a/Wino.Core.Domain/Interfaces/IFileService.cs b/Wino.Core.Domain/Interfaces/IFileService.cs index 5500e2f9..8af22e8a 100644 --- a/Wino.Core.Domain/Interfaces/IFileService.cs +++ b/Wino.Core.Domain/Interfaces/IFileService.cs @@ -1,7 +1,7 @@ using System.IO; using System.Threading.Tasks; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IFileService { diff --git a/Wino.Core.Domain/Interfaces/IFolderMenuItem.cs b/Wino.Core.Domain/Interfaces/IFolderMenuItem.cs index 2fe58504..612d7a97 100644 --- a/Wino.Core.Domain/Interfaces/IFolderMenuItem.cs +++ b/Wino.Core.Domain/Interfaces/IFolderMenuItem.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Models.Folders; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IFolderMenuItem : IBaseFolderMenuItem { diff --git a/Wino.Core.Domain/Interfaces/IFolderService.cs b/Wino.Core.Domain/Interfaces/IFolderService.cs index 3c4e0d26..288a779e 100644 --- a/Wino.Core.Domain/Interfaces/IFolderService.cs +++ b/Wino.Core.Domain/Interfaces/IFolderService.cs @@ -1,14 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Accounts; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Synchronization; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Models.Accounts; +using Wino.Domain.Models.Folders; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Synchronization; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IFolderService { @@ -82,7 +79,7 @@ namespace Wino.Core.Domain.Interfaces /// Returns the active folder menu items for the given account for UI. /// /// Account to get folder menu items for. - Task> GetAccountFoldersForDisplayAsync(IAccountMenuItem accountMenuItem); + // Task> GetAccountFoldersForDisplayAsync(IAccountMenuItem accountMenuItem); /// /// Returns a list of unread item counts for the given account ids. @@ -90,5 +87,13 @@ namespace Wino.Core.Domain.Interfaces /// /// Account ids to get unread folder counts for. Task> GetUnreadItemCountResultsAsync(IEnumerable accountIds); + Task> GetVisibleFoldersAsync(Guid accountId); + + /// + /// Returns the child folders of the given folder. + /// + /// Account id to get folders for. + /// Parent folder id to get children for. + Task> GetChildFoldersAsync(Guid accountId, string parentRemoteFolderId); } } diff --git a/Wino.Core.Domain/Interfaces/IFontService.cs b/Wino.Core.Domain/Interfaces/IFontService.cs index ff00cdab..22cc0994 100644 --- a/Wino.Core.Domain/Interfaces/IFontService.cs +++ b/Wino.Core.Domain/Interfaces/IFontService.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Reader; +using Wino.Domain.Enums; +using Wino.Domain.Models.Reader; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IFontService { diff --git a/Wino.Core.Domain/Interfaces/IGmailAuthenticator.cs b/Wino.Core.Domain/Interfaces/IGmailAuthenticator.cs new file mode 100644 index 00000000..e7b7d844 --- /dev/null +++ b/Wino.Core.Domain/Interfaces/IGmailAuthenticator.cs @@ -0,0 +1,4 @@ +namespace Wino.Domain.Interfaces +{ + public interface IGmailAuthenticator : IAuthenticator { } +} diff --git a/Wino.Core.Domain/Interfaces/IGmailChangeProcessor.cs b/Wino.Core.Domain/Interfaces/IGmailChangeProcessor.cs new file mode 100644 index 00000000..467b12a2 --- /dev/null +++ b/Wino.Core.Domain/Interfaces/IGmailChangeProcessor.cs @@ -0,0 +1,7 @@ +namespace Wino.Domain.Interfaces +{ + public interface IGmailChangeProcessor : IDefaultChangeProcessor + { + Task MapLocalDraftAsync(string mailCopyId, string newDraftId, string newThreadId); + } +} diff --git a/Wino.Core.Domain/Interfaces/IHtmlPreviewer.cs b/Wino.Core.Domain/Interfaces/IHtmlPreviewer.cs new file mode 100644 index 00000000..99bce867 --- /dev/null +++ b/Wino.Core.Domain/Interfaces/IHtmlPreviewer.cs @@ -0,0 +1,11 @@ +namespace Wino.Domain.Interfaces +{ + public interface IHtmlPreviewer + { + /// + /// Returns a preview of the HTML content. + /// + /// HTML content + string GetHtmlPreview(string htmlContent); + } +} diff --git a/Wino.Core.Domain/Interfaces/IImapChangeProcessor.cs b/Wino.Core.Domain/Interfaces/IImapChangeProcessor.cs new file mode 100644 index 00000000..7912c964 --- /dev/null +++ b/Wino.Core.Domain/Interfaces/IImapChangeProcessor.cs @@ -0,0 +1,11 @@ +namespace Wino.Domain.Interfaces +{ + public interface IImapChangeProcessor : IDefaultChangeProcessor + { + /// + /// Returns all known uids for the given folder. + /// + /// Folder id to retrieve uIds for. + Task> GetKnownUidsForFolderAsync(Guid folderId); + } +} diff --git a/Wino.Core.Domain/Interfaces/IImapTestService.cs b/Wino.Core.Domain/Interfaces/IImapTestService.cs index 1288bc39..62d8d23b 100644 --- a/Wino.Core.Domain/Interfaces/IImapTestService.cs +++ b/Wino.Core.Domain/Interfaces/IImapTestService.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IImapTestService { diff --git a/Wino.Core.Domain/Interfaces/IInitializeAsync.cs b/Wino.Core.Domain/Interfaces/IInitializeAsync.cs index 1850a7c0..f1c40684 100644 --- a/Wino.Core.Domain/Interfaces/IInitializeAsync.cs +++ b/Wino.Core.Domain/Interfaces/IInitializeAsync.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { /// /// An interface that all startup services must implement. diff --git a/Wino.Core.Domain/Interfaces/IKeyPressService.cs b/Wino.Core.Domain/Interfaces/IKeyPressService.cs index 724ad0c4..3ed7f834 100644 --- a/Wino.Core.Domain/Interfaces/IKeyPressService.cs +++ b/Wino.Core.Domain/Interfaces/IKeyPressService.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IKeyPressService { diff --git a/Wino.Core.Domain/Interfaces/ILaunchProtocolService.cs b/Wino.Core.Domain/Interfaces/ILaunchProtocolService.cs index 5c141d4b..c4b07527 100644 --- a/Wino.Core.Domain/Interfaces/ILaunchProtocolService.cs +++ b/Wino.Core.Domain/Interfaces/ILaunchProtocolService.cs @@ -1,6 +1,6 @@ using System.Collections.Specialized; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface ILaunchProtocolService { diff --git a/Wino.Core.Domain/Interfaces/ILogInitializer.cs b/Wino.Core.Domain/Interfaces/ILogInitializer.cs index f5f7e97d..5468cce7 100644 --- a/Wino.Core.Domain/Interfaces/ILogInitializer.cs +++ b/Wino.Core.Domain/Interfaces/ILogInitializer.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface ILogInitializer { diff --git a/Wino.Core.Domain/Interfaces/IMailService.cs b/Wino.Core.Domain/Interfaces/IMailService.cs index 108c1b3e..af7f24f3 100644 --- a/Wino.Core.Domain/Interfaces/IMailService.cs +++ b/Wino.Core.Domain/Interfaces/IMailService.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Threading.Tasks; using MimeKit; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Entities; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IMailService { @@ -92,5 +92,7 @@ namespace Wino.Core.Domain.Interfaces /// /// Folder id to get unread mails for. Task> GetUnreadMailsByFolderIdAsync(Guid folderId); + Task GetReplyParentAsync(IMailItem replyItem, Guid accountId, Guid threadingFolderId, Guid sentFolderId, Guid draftFolderId); + Task GetInReplyToReplyAsync(IMailItem originalItem, Guid accountId, Guid threadingFolderId, Guid sentFolderId, Guid draftFolderId); } } diff --git a/Wino.Core.Domain/Interfaces/IMenuItem.cs b/Wino.Core.Domain/Interfaces/IMenuItem.cs index 68997e3f..b9b53403 100644 --- a/Wino.Core.Domain/Interfaces/IMenuItem.cs +++ b/Wino.Core.Domain/Interfaces/IMenuItem.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IMenuItem { diff --git a/Wino.Core.Domain/Interfaces/IMenuOperation.cs b/Wino.Core.Domain/Interfaces/IMenuOperation.cs index 48279547..ff09b485 100644 --- a/Wino.Core.Domain/Interfaces/IMenuOperation.cs +++ b/Wino.Core.Domain/Interfaces/IMenuOperation.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IMenuOperation { diff --git a/Wino.Core.Domain/Interfaces/IMimeFileService.cs b/Wino.Core.Domain/Interfaces/IMimeFileService.cs new file mode 100644 index 00000000..d235313e --- /dev/null +++ b/Wino.Core.Domain/Interfaces/IMimeFileService.cs @@ -0,0 +1,68 @@ +using MimeKit; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Mime; +using Wino.Domain.Models.Reader; + +namespace Wino.Domain.Interfaces +{ + public interface IMimeFileService + { + /// + /// Finds the EML file for the given mail id for address, parses and returns MimeMessage. + /// + /// Cancellation token + /// Mime message information + Task GetMimeMessageInformationAsync(Guid fileId, Guid accountId, CancellationToken cancellationToken = default); + + /// + /// Gets the mime message information for the given EML file bytes. + /// This override is used when EML file association launch is used + /// because we may not have the access to the file path. + /// + /// Byte array of the file. + /// Cancellation token + /// Mime message information + Task GetMimeMessageInformationAsync(byte[] fileBytes, string emlFilePath, CancellationToken cancellationToken = default); + + /// + /// Saves EML file to the disk. + /// + /// MailCopy of the native message. + /// MimeMessage that is parsed from native message. + /// Which account Id to save this file for. + Task SaveMimeMessageAsync(Guid fileId, MimeMessage mimeMessage, Guid accountId); + + /// + /// Returns a path that all Mime resources (including eml) is stored for this MailCopyId + /// This is useful for storing previously rendered attachments as well. + /// + /// Account address + /// Resource mail copy id + Task GetMimeResourcePathAsync(Guid accountId, Guid fileId); + + /// + /// Returns whether mime file exists locally or not. + /// + Task IsMimeExistAsync(Guid accountId, Guid fileId); + + /// + /// Creates HtmlPreviewVisitor for the given MimeMessage. + /// + /// Mime + /// File path that mime is located to load resources. + HtmlPreviewVisitor CreateHTMLPreviewVisitor(MimeMessage message, string mimeLocalPath); + + /// + /// Deletes the given mime file from the disk. + /// + Task DeleteMimeMessageAsync(Guid accountId, Guid fileId); + + /// + /// Prepares the final model containing rendering details. + /// + /// Message to render. + /// File path that physical MimeMessage is located. + /// Rendering options + MailRenderModel GetMailRenderModel(MimeMessage message, string mimeLocalPath, MailRenderingOptions options = null); + } +} diff --git a/Wino.Core.Domain/Interfaces/INativeAppService.cs b/Wino.Core.Domain/Interfaces/INativeAppService.cs index 93162f73..2cfd4f9c 100644 --- a/Wino.Core.Domain/Interfaces/INativeAppService.cs +++ b/Wino.Core.Domain/Interfaces/INativeAppService.cs @@ -1,8 +1,8 @@ using System; using System.Threading.Tasks; -using Wino.Core.Domain.Models.Authorization; +using Wino.Domain.Models.Authorization; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface INativeAppService { diff --git a/Wino.Core.Domain/Interfaces/INavigationAware.cs b/Wino.Core.Domain/Interfaces/INavigationAware.cs index 222d7c31..fd2a18e1 100644 --- a/Wino.Core.Domain/Interfaces/INavigationAware.cs +++ b/Wino.Core.Domain/Interfaces/INavigationAware.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Models.Navigation; +using Wino.Domain.Models.Navigation; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface INavigationAware { diff --git a/Wino.Core.Domain/Interfaces/INotificationBuilder.cs b/Wino.Core.Domain/Interfaces/INotificationBuilder.cs index 683bff44..6afa1017 100644 --- a/Wino.Core.Domain/Interfaces/INotificationBuilder.cs +++ b/Wino.Core.Domain/Interfaces/INotificationBuilder.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface INotificationBuilder { diff --git a/Wino.Core.Domain/Interfaces/IOutlookAuthenticator.cs b/Wino.Core.Domain/Interfaces/IOutlookAuthenticator.cs new file mode 100644 index 00000000..0f655df7 --- /dev/null +++ b/Wino.Core.Domain/Interfaces/IOutlookAuthenticator.cs @@ -0,0 +1,4 @@ +namespace Wino.Domain.Interfaces +{ + public interface IOutlookAuthenticator : IAuthenticator { } +} diff --git a/Wino.Core.Domain/Interfaces/IOutlookChangeProcessor.cs b/Wino.Core.Domain/Interfaces/IOutlookChangeProcessor.cs new file mode 100644 index 00000000..5c39a2f3 --- /dev/null +++ b/Wino.Core.Domain/Interfaces/IOutlookChangeProcessor.cs @@ -0,0 +1,22 @@ +namespace Wino.Domain.Interfaces +{ + public interface IOutlookChangeProcessor : IDefaultChangeProcessor + { + /// + /// Interrupted initial synchronization may cause downloaded mails to be saved in the database twice. + /// Since downloading mime is costly in Outlook, we need to check if the actual copy of the message has been saved before. + /// + /// MailCopyId of the message. + /// Whether the mime has b + Task IsMailExistsAsync(string messageId); + + /// + /// Updates Folder's delta synchronization identifier. + /// Only used in Outlook since it does per-folder sync. + /// + /// Folder id + /// New synchronization identifier. + /// New identifier if success. + Task UpdateFolderDeltaSynchronizationIdentifierAsync(Guid folderId, string deltaSynchronizationIdentifier); + } +} diff --git a/Wino.Core.Domain/Interfaces/IPreferencesService.cs b/Wino.Core.Domain/Interfaces/IPreferencesService.cs index 38474cdb..95842a54 100644 --- a/Wino.Core.Domain/Interfaces/IPreferencesService.cs +++ b/Wino.Core.Domain/Interfaces/IPreferencesService.cs @@ -1,8 +1,8 @@ using System; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Reader; +using Wino.Domain.Enums; +using Wino.Domain.Models.Reader; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IPreferencesService { diff --git a/Wino.Core.Domain/Interfaces/IProviderDetail.cs b/Wino.Core.Domain/Interfaces/IProviderDetail.cs index e43c6044..c0720ced 100644 --- a/Wino.Core.Domain/Interfaces/IProviderDetail.cs +++ b/Wino.Core.Domain/Interfaces/IProviderDetail.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IProviderDetail { diff --git a/Wino.Core.Domain/Interfaces/IProviderService.cs b/Wino.Core.Domain/Interfaces/IProviderService.cs index f961b0ea..6b56f272 100644 --- a/Wino.Core.Domain/Interfaces/IProviderService.cs +++ b/Wino.Core.Domain/Interfaces/IProviderService.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IProviderService { diff --git a/Wino.Core.Domain/Interfaces/IRequestBundle.cs b/Wino.Core.Domain/Interfaces/IRequestBundle.cs index 7c81cbd9..049e6b25 100644 --- a/Wino.Core.Domain/Interfaces/IRequestBundle.cs +++ b/Wino.Core.Domain/Interfaces/IRequestBundle.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; +using Wino.Domain.Entities; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { /// /// Represents a group of requests. diff --git a/Wino.Core.Domain/Interfaces/IServerMessage.cs b/Wino.Core.Domain/Interfaces/IServerMessage.cs index 5b644cb0..4d84ca24 100644 --- a/Wino.Core.Domain/Interfaces/IServerMessage.cs +++ b/Wino.Core.Domain/Interfaces/IServerMessage.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { /// /// Interface for all messages to report UI changes from synchronizers to UI. diff --git a/Wino.Core.Domain/Interfaces/ISignatureService.cs b/Wino.Core.Domain/Interfaces/ISignatureService.cs index f3d30131..6255a8d7 100644 --- a/Wino.Core.Domain/Interfaces/ISignatureService.cs +++ b/Wino.Core.Domain/Interfaces/ISignatureService.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface ISignatureService { diff --git a/Wino.Core.Domain/Interfaces/IStatePersistenceService.cs b/Wino.Core.Domain/Interfaces/IStatePersistenceService.cs index f6a8cf73..cb5e5192 100644 --- a/Wino.Core.Domain/Interfaces/IStatePersistenceService.cs +++ b/Wino.Core.Domain/Interfaces/IStatePersistenceService.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IStatePersistanceService : INotifyPropertyChanged { diff --git a/Wino.Core.Domain/Interfaces/IStoreManagementService.cs b/Wino.Core.Domain/Interfaces/IStoreManagementService.cs index 36e3ebc9..12b6ab59 100644 --- a/Wino.Core.Domain/Interfaces/IStoreManagementService.cs +++ b/Wino.Core.Domain/Interfaces/IStoreManagementService.cs @@ -1,8 +1,8 @@ using System.Threading.Tasks; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Store; +using Wino.Domain.Enums; +using Wino.Domain.Models.Store; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IStoreManagementService { diff --git a/Wino.Core.Domain/Interfaces/IStoreRatingDialog.cs b/Wino.Core.Domain/Interfaces/IStoreRatingDialog.cs index c56ef4a4..17ed233b 100644 --- a/Wino.Core.Domain/Interfaces/IStoreRatingDialog.cs +++ b/Wino.Core.Domain/Interfaces/IStoreRatingDialog.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IStoreRatingDialog { diff --git a/Wino.Core.Domain/Interfaces/IStoreRatingService.cs b/Wino.Core.Domain/Interfaces/IStoreRatingService.cs index 7b1ba764..f9b6af43 100644 --- a/Wino.Core.Domain/Interfaces/IStoreRatingService.cs +++ b/Wino.Core.Domain/Interfaces/IStoreRatingService.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IStoreRatingService { diff --git a/Wino.Core.Domain/Interfaces/ISynchronizationProgress.cs b/Wino.Core.Domain/Interfaces/ISynchronizationProgress.cs index eb952cf7..c2ea391a 100644 --- a/Wino.Core.Domain/Interfaces/ISynchronizationProgress.cs +++ b/Wino.Core.Domain/Interfaces/ISynchronizationProgress.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { /// /// An interface for reporting progress of the synchronization. diff --git a/Wino.Core.Domain/Interfaces/IThemeService.cs b/Wino.Core.Domain/Interfaces/IThemeService.cs index 57c3f471..26e36b0b 100644 --- a/Wino.Core.Domain/Interfaces/IThemeService.cs +++ b/Wino.Core.Domain/Interfaces/IThemeService.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Personalization; +using Wino.Domain.Enums; +using Wino.Domain.Models.Personalization; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IThemeService : IInitializeAsync { diff --git a/Wino.Core.Domain/Interfaces/IThreadingStrategy.cs b/Wino.Core.Domain/Interfaces/IThreadingStrategy.cs index cd0cec9c..3518ffae 100644 --- a/Wino.Core.Domain/Interfaces/IThreadingStrategy.cs +++ b/Wino.Core.Domain/Interfaces/IThreadingStrategy.cs @@ -1,9 +1,7 @@ -using System.Collections.Generic; -using System.Threading.Tasks; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Entities; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IThreadingStrategy { @@ -15,4 +13,10 @@ namespace Wino.Core.Domain.Interfaces Task> ThreadItemsAsync(List items); bool ShouldThreadWithItem(IMailItem originalItem, IMailItem targetItem); } + + public interface IOutlookThreadingStrategy : IThreadingStrategy { } + + public interface IGmailThreadingStrategy : IThreadingStrategy { } + + public interface IImapThreadStrategy : IThreadingStrategy { } } diff --git a/Wino.Core.Domain/Interfaces/IThreadingStrategyProvider.cs b/Wino.Core.Domain/Interfaces/IThreadingStrategyProvider.cs index 9e3fa87b..c188ee00 100644 --- a/Wino.Core.Domain/Interfaces/IThreadingStrategyProvider.cs +++ b/Wino.Core.Domain/Interfaces/IThreadingStrategyProvider.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IThreadingStrategyProvider { diff --git a/Wino.Core.Domain/Interfaces/ITokenService.cs b/Wino.Core.Domain/Interfaces/ITokenService.cs new file mode 100644 index 00000000..a17a3e64 --- /dev/null +++ b/Wino.Core.Domain/Interfaces/ITokenService.cs @@ -0,0 +1,10 @@ +using Wino.Domain.Entities; + +namespace Wino.Domain.Interfaces +{ + public interface ITokenService + { + Task GetTokenInformationAsync(Guid accountId); + Task SaveTokenInformationAsync(Guid accountId, TokenInformation tokenInformation); + } +} diff --git a/Wino.Core.Domain/Interfaces/ITranslationService.cs b/Wino.Core.Domain/Interfaces/ITranslationService.cs index e756f3cd..412d4e20 100644 --- a/Wino.Core.Domain/Interfaces/ITranslationService.cs +++ b/Wino.Core.Domain/Interfaces/ITranslationService.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Threading.Tasks; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Translations; +using Wino.Domain.Enums; +using Wino.Domain.Models.Translations; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface ITranslationService : IInitializeAsync { diff --git a/Wino.Core.Domain/Interfaces/IUnderlyingThemeService.cs b/Wino.Core.Domain/Interfaces/IUnderlyingThemeService.cs index 5de11c78..e0385176 100644 --- a/Wino.Core.Domain/Interfaces/IUnderlyingThemeService.cs +++ b/Wino.Core.Domain/Interfaces/IUnderlyingThemeService.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IUnderlyingThemeService { diff --git a/Wino.Core.Domain/Interfaces/IUnsubscriptionService.cs b/Wino.Core.Domain/Interfaces/IUnsubscriptionService.cs index f066895a..0e05c2ba 100644 --- a/Wino.Core.Domain/Interfaces/IUnsubscriptionService.cs +++ b/Wino.Core.Domain/Interfaces/IUnsubscriptionService.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using Wino.Core.Domain.Models.Reader; +using Wino.Domain.Models.Reader; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IUnsubscriptionService { diff --git a/Wino.Core.Domain/Interfaces/IWinoNavigationService.cs b/Wino.Core.Domain/Interfaces/IWinoNavigationService.cs index ba5cf026..b4b918ca 100644 --- a/Wino.Core.Domain/Interfaces/IWinoNavigationService.cs +++ b/Wino.Core.Domain/Interfaces/IWinoNavigationService.cs @@ -1,8 +1,8 @@ -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Navigation; +using Wino.Domain.Enums; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Navigation; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IWinoNavigationService { diff --git a/Wino.Core.Domain/Interfaces/IWinoRequestDelegator.cs b/Wino.Core.Domain/Interfaces/IWinoRequestDelegator.cs index 19906904..f4ec667d 100644 --- a/Wino.Core.Domain/Interfaces/IWinoRequestDelegator.cs +++ b/Wino.Core.Domain/Interfaces/IWinoRequestDelegator.cs @@ -1,33 +1,36 @@ -using System.Threading.Tasks; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Models.Folders; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { + /// + /// Prepares server requests and delegates them to proper synchronizers. + /// This is the last point for sending the server request. + /// public interface IWinoRequestDelegator { /// /// Prepares requires IRequest collection for mail actions and executes them via proper synchronizers. /// /// Preperation model that encapsulates action and mail items. - Task ExecuteAsync(MailOperationPreperationRequest prerperationRequest); + Task QueueAsync(MailOperationPreperationRequest prerperationRequest); /// /// Queues new draft creation request for synchronizer. /// /// A class that holds the parameters for creating a draft. - Task ExecuteAsync(DraftPreperationRequest draftPreperationRequest); + Task QueueAsync(DraftPreperationRequest draftPreperationRequest); /// /// Queues a new request for synchronizer to send a draft. /// /// Draft sending request. - Task ExecuteAsync(SendDraftPreparationRequest sendDraftPreperationRequest); + Task QueueAsync(SendDraftPreparationRequest sendDraftPreperationRequest); /// - /// Prepares requires IRequest collection for folder actions and executes them via proper synchronizers. + /// Prepares required IRequest collection for folder actions and executes them via proper synchronizers. /// /// Folder prep request. - Task ExecuteAsync(FolderOperationPreperationRequest folderOperationPreperationRequest); + Task QueueAsync(FolderOperationPreperationRequest folderOperationPreperationRequest); } } diff --git a/Wino.Core.Domain/Interfaces/IWinoRequestProcessor.cs b/Wino.Core.Domain/Interfaces/IWinoRequestProcessor.cs index 32b1aacf..d7b21da8 100644 --- a/Wino.Core.Domain/Interfaces/IWinoRequestProcessor.cs +++ b/Wino.Core.Domain/Interfaces/IWinoRequestProcessor.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Threading.Tasks; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Models.Folders; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IWinoRequestProcessor { diff --git a/Wino.Core.Domain/Interfaces/IWinoServerConnectionManager.cs b/Wino.Core.Domain/Interfaces/IWinoServerConnectionManager.cs index 38c6a1a8..96bf6bf4 100644 --- a/Wino.Core.Domain/Interfaces/IWinoServerConnectionManager.cs +++ b/Wino.Core.Domain/Interfaces/IWinoServerConnectionManager.cs @@ -1,8 +1,8 @@ using System; using System.Threading.Tasks; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Interfaces +namespace Wino.Domain.Interfaces { public interface IWinoServerConnectionManager { diff --git a/Wino.Core.Domain/Models/Accounts/AccountCreationDialogResult.cs b/Wino.Core.Domain/Models/Accounts/AccountCreationDialogResult.cs index a1081b9e..6d00a89a 100644 --- a/Wino.Core.Domain/Models/Accounts/AccountCreationDialogResult.cs +++ b/Wino.Core.Domain/Models/Accounts/AccountCreationDialogResult.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Accounts +namespace Wino.Domain.Models.Accounts { public record AccountCreationDialogResult(MailProviderType ProviderType, string AccountName, string SenderName, string AccountColorHex = ""); } diff --git a/Wino.Core.Domain/Models/Accounts/ImapAuthenticationMethodModel.cs b/Wino.Core.Domain/Models/Accounts/ImapAuthenticationMethodModel.cs index f28b9d6e..056b62c2 100644 --- a/Wino.Core.Domain/Models/Accounts/ImapAuthenticationMethodModel.cs +++ b/Wino.Core.Domain/Models/Accounts/ImapAuthenticationMethodModel.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Accounts +namespace Wino.Domain.Models.Accounts { public class ImapAuthenticationMethodModel(ImapAuthenticationMethod imapAuthenticationMethod, string displayName) { diff --git a/Wino.Core.Domain/Models/Accounts/ImapConnectionSecurityModel.cs b/Wino.Core.Domain/Models/Accounts/ImapConnectionSecurityModel.cs index a618a490..3723838f 100644 --- a/Wino.Core.Domain/Models/Accounts/ImapConnectionSecurityModel.cs +++ b/Wino.Core.Domain/Models/Accounts/ImapConnectionSecurityModel.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Accounts +namespace Wino.Domain.Models.Accounts { public class ImapConnectionSecurityModel(ImapConnectionSecurity imapConnectionSecurity, string displayName) { diff --git a/Wino.Core.Domain/Models/Accounts/ProviderDetail.cs b/Wino.Core.Domain/Models/Accounts/ProviderDetail.cs index 4f794749..7dde400b 100644 --- a/Wino.Core.Domain/Models/Accounts/ProviderDetail.cs +++ b/Wino.Core.Domain/Models/Accounts/ProviderDetail.cs @@ -1,7 +1,7 @@ -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; -namespace Wino.Core.Domain.Models.Accounts +namespace Wino.Domain.Models.Accounts { public class ProviderDetail : IProviderDetail { diff --git a/Wino.Core.Domain/Models/Accounts/UnreadItemCountResult.cs b/Wino.Core.Domain/Models/Accounts/UnreadItemCountResult.cs index ba5aabf5..dee634a0 100644 --- a/Wino.Core.Domain/Models/Accounts/UnreadItemCountResult.cs +++ b/Wino.Core.Domain/Models/Accounts/UnreadItemCountResult.cs @@ -1,7 +1,7 @@ using System; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Accounts +namespace Wino.Domain.Models.Accounts { public class UnreadItemCountResult { diff --git a/Wino.Core.Domain/Models/Authentication/TokenInformationBase.cs b/Wino.Core.Domain/Models/Authentication/TokenInformationBase.cs index 27f69abf..e2b3080c 100644 --- a/Wino.Core.Domain/Models/Authentication/TokenInformationBase.cs +++ b/Wino.Core.Domain/Models/Authentication/TokenInformationBase.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Models.Authentication +namespace Wino.Domain.Models.Authentication { public class TokenInformationBase { diff --git a/Wino.Core.Domain/Models/Authorization/GoogleAuthorizationRequest.cs b/Wino.Core.Domain/Models/Authorization/GoogleAuthorizationRequest.cs index 455fff47..fb609709 100644 --- a/Wino.Core.Domain/Models/Authorization/GoogleAuthorizationRequest.cs +++ b/Wino.Core.Domain/Models/Authorization/GoogleAuthorizationRequest.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Wino.Core.Domain.Exceptions; +using Wino.Domain.Exceptions; -namespace Wino.Core.Domain.Models.Authorization +namespace Wino.Domain.Models.Authorization { public class GoogleAuthorizationRequest { diff --git a/Wino.Core.Domain/Models/Authorization/GoogleTokenizationRequest.cs b/Wino.Core.Domain/Models/Authorization/GoogleTokenizationRequest.cs index 0590df09..28d005a6 100644 --- a/Wino.Core.Domain/Models/Authorization/GoogleTokenizationRequest.cs +++ b/Wino.Core.Domain/Models/Authorization/GoogleTokenizationRequest.cs @@ -1,7 +1,6 @@ -using System; -using Wino.Core.Domain.Exceptions; +using Wino.Domain.Exceptions; -namespace Wino.Core.Domain.Models.Authorization +namespace Wino.Domain.Models.Authorization { public class GoogleTokenizationRequest { diff --git a/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoveryMinimalSettings.cs b/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoveryMinimalSettings.cs index b1135a5b..cf134619 100644 --- a/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoveryMinimalSettings.cs +++ b/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoveryMinimalSettings.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Models.AutoDiscovery +namespace Wino.Domain.Models.AutoDiscovery { public class AutoDiscoveryMinimalSettings { diff --git a/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoveryProviderSetting.cs b/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoveryProviderSetting.cs index 59abe9ae..30ce28dc 100644 --- a/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoveryProviderSetting.cs +++ b/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoveryProviderSetting.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Wino.Core.Domain.Models.AutoDiscovery +namespace Wino.Domain.Models.AutoDiscovery { public class AutoDiscoveryProviderSetting { diff --git a/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoverySettings.cs b/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoverySettings.cs index cfcb55ff..a68cbf62 100644 --- a/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoverySettings.cs +++ b/Wino.Core.Domain/Models/AutoDiscovery/AutoDiscoverySettings.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Text.Json.Serialization; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Models.AutoDiscovery +namespace Wino.Domain.Models.AutoDiscovery { public class AutoDiscoverySettings { diff --git a/Wino.Core.Domain/Models/Comparers/DateComparer.cs b/Wino.Core.Domain/Models/Comparers/DateComparer.cs index c739ec9e..73cc32c7 100644 --- a/Wino.Core.Domain/Models/Comparers/DateComparer.cs +++ b/Wino.Core.Domain/Models/Comparers/DateComparer.cs @@ -1,9 +1,9 @@ using System; using System.Collections; using System.Collections.Generic; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Models.Comparers +namespace Wino.Domain.Models.Comparers { public class DateComparer : IComparer, IEqualityComparer { diff --git a/Wino.Core.Domain/Models/Comparers/DateTimeComparer.cs b/Wino.Core.Domain/Models/Comparers/DateTimeComparer.cs index eab8185e..af4a12f4 100644 --- a/Wino.Core.Domain/Models/Comparers/DateTimeComparer.cs +++ b/Wino.Core.Domain/Models/Comparers/DateTimeComparer.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Wino.Core.Domain.Models.Comparers +namespace Wino.Domain.Models.Comparers { /// /// Used to insert date grouping into proper place in Reader page. diff --git a/Wino.Core.Domain/Models/Comparers/FolderNameComparer.cs b/Wino.Core.Domain/Models/Comparers/FolderNameComparer.cs index 8f7e0928..59c87116 100644 --- a/Wino.Core.Domain/Models/Comparers/FolderNameComparer.cs +++ b/Wino.Core.Domain/Models/Comparers/FolderNameComparer.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Models.Comparers +namespace Wino.Domain.Models.Comparers { public class FolderNameComparer : IComparer { diff --git a/Wino.Core.Domain/Models/Comparers/ListItemComparer.cs b/Wino.Core.Domain/Models/Comparers/ListItemComparer.cs index d73ca190..ffb6fc5c 100644 --- a/Wino.Core.Domain/Models/Comparers/ListItemComparer.cs +++ b/Wino.Core.Domain/Models/Comparers/ListItemComparer.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Models.Comparers +namespace Wino.Domain.Models.Comparers { public class ListItemComparer : IComparer { diff --git a/Wino.Core.Domain/Models/Comparers/NameComparer.cs b/Wino.Core.Domain/Models/Comparers/NameComparer.cs index 86b5c10f..f0fed9c5 100644 --- a/Wino.Core.Domain/Models/Comparers/NameComparer.cs +++ b/Wino.Core.Domain/Models/Comparers/NameComparer.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Models.Comparers +namespace Wino.Domain.Models.Comparers { public class NameComparer : IComparer { diff --git a/Wino.Core.Domain/Models/Folders/AccountFolderTree.cs b/Wino.Core.Domain/Models/Folders/AccountFolderTree.cs index 7fb13dc9..4c814d28 100644 --- a/Wino.Core.Domain/Models/Folders/AccountFolderTree.cs +++ b/Wino.Core.Domain/Models/Folders/AccountFolderTree.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; +using Wino.Domain.Entities; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Folders +namespace Wino.Domain.Models.Folders { /// /// Grouped folder information for the menu for given account. diff --git a/Wino.Core.Domain/Models/Folders/FolderOperationMenuItem.cs b/Wino.Core.Domain/Models/Folders/FolderOperationMenuItem.cs index e54afa7f..d6665249 100644 --- a/Wino.Core.Domain/Models/Folders/FolderOperationMenuItem.cs +++ b/Wino.Core.Domain/Models/Folders/FolderOperationMenuItem.cs @@ -1,8 +1,8 @@ -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Menus; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Menus; -namespace Wino.Core.Domain.Models.Folders +namespace Wino.Domain.Models.Folders { public class FolderOperationMenuItem : MenuOperationItemBase, IMenuOperation { diff --git a/Wino.Core.Domain/Models/Folders/FolderOperationPreperationRequest.cs b/Wino.Core.Domain/Models/Folders/FolderOperationPreperationRequest.cs index af3ccf7e..501d87e3 100644 --- a/Wino.Core.Domain/Models/Folders/FolderOperationPreperationRequest.cs +++ b/Wino.Core.Domain/Models/Folders/FolderOperationPreperationRequest.cs @@ -1,7 +1,7 @@ -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; +using Wino.Domain.Entities; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Folders +namespace Wino.Domain.Models.Folders { /// /// Encapsulates a request to prepare a folder operation like Rename, Delete, etc. diff --git a/Wino.Core.Domain/Models/Folders/IMailItemFolder.cs b/Wino.Core.Domain/Models/Folders/IMailItemFolder.cs index 8853cbf7..a97d4a4e 100644 --- a/Wino.Core.Domain/Models/Folders/IMailItemFolder.cs +++ b/Wino.Core.Domain/Models/Folders/IMailItemFolder.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Folders +namespace Wino.Domain.Models.Folders { public interface IMailItemFolder { diff --git a/Wino.Core.Domain/Models/MailItem/DraftCreationOptions.cs b/Wino.Core.Domain/Models/MailItem/DraftCreationOptions.cs index aff9b515..bd16b99e 100644 --- a/Wino.Core.Domain/Models/MailItem/DraftCreationOptions.cs +++ b/Wino.Core.Domain/Models/MailItem/DraftCreationOptions.cs @@ -1,10 +1,10 @@ using System.Collections.Specialized; using System.Linq; using MimeKit; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; +using Wino.Domain.Entities; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { public class DraftCreationOptions { diff --git a/Wino.Core.Domain/Models/MailItem/DraftPreperationRequest.cs b/Wino.Core.Domain/Models/MailItem/DraftPreperationRequest.cs index 2be737f4..6ce098b7 100644 --- a/Wino.Core.Domain/Models/MailItem/DraftPreperationRequest.cs +++ b/Wino.Core.Domain/Models/MailItem/DraftPreperationRequest.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Text; using MimeKit; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { public class DraftPreperationRequest : DraftCreationOptions { diff --git a/Wino.Core.Domain/Models/MailItem/IMailHashContainer.cs b/Wino.Core.Domain/Models/MailItem/IMailHashContainer.cs index 1426bc04..54412523 100644 --- a/Wino.Core.Domain/Models/MailItem/IMailHashContainer.cs +++ b/Wino.Core.Domain/Models/MailItem/IMailHashContainer.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { /// /// An interface that returns the UniqueId store for IMailItem. diff --git a/Wino.Core.Domain/Models/MailItem/IMailItem.cs b/Wino.Core.Domain/Models/MailItem/IMailItem.cs index 73f01e02..dfd8b2be 100644 --- a/Wino.Core.Domain/Models/MailItem/IMailItem.cs +++ b/Wino.Core.Domain/Models/MailItem/IMailItem.cs @@ -1,7 +1,7 @@ using System; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { /// /// Interface of simplest representation of a MailCopy. diff --git a/Wino.Core.Domain/Models/MailItem/IMailItemThread.cs b/Wino.Core.Domain/Models/MailItem/IMailItemThread.cs index 22fd0699..7fa72f55 100644 --- a/Wino.Core.Domain/Models/MailItem/IMailItemThread.cs +++ b/Wino.Core.Domain/Models/MailItem/IMailItemThread.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { /// /// Interface that represents conversation threads. diff --git a/Wino.Core.Domain/Models/MailItem/MailDetailInformation.cs b/Wino.Core.Domain/Models/MailItem/MailDetailInformation.cs index c79f1039..5f130efe 100644 --- a/Wino.Core.Domain/Models/MailItem/MailDetailInformation.cs +++ b/Wino.Core.Domain/Models/MailItem/MailDetailInformation.cs @@ -1,7 +1,7 @@ using System; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { public class MailDetailInformation { diff --git a/Wino.Core.Domain/Models/MailItem/MailDragPackage.cs b/Wino.Core.Domain/Models/MailItem/MailDragPackage.cs index 2f47a267..a3eb8d08 100644 --- a/Wino.Core.Domain/Models/MailItem/MailDragPackage.cs +++ b/Wino.Core.Domain/Models/MailItem/MailDragPackage.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { /// /// Class that holds information when the drag/drop of mails are performed. diff --git a/Wino.Core.Domain/Models/MailItem/MailFolderPairMetadata.cs b/Wino.Core.Domain/Models/MailItem/MailFolderPairMetadata.cs index 158425c8..2a2dd0f3 100644 --- a/Wino.Core.Domain/Models/MailItem/MailFolderPairMetadata.cs +++ b/Wino.Core.Domain/Models/MailItem/MailFolderPairMetadata.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { public class MailFolderPairMetadata { diff --git a/Wino.Core.Domain/Models/MailItem/MailInsertPackage.cs b/Wino.Core.Domain/Models/MailItem/MailInsertPackage.cs index 5d8a3a65..ea67b058 100644 --- a/Wino.Core.Domain/Models/MailItem/MailInsertPackage.cs +++ b/Wino.Core.Domain/Models/MailItem/MailInsertPackage.cs @@ -1,7 +1,7 @@ using MimeKit; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { public record NewMailItemPackage(MailCopy Copy, MimeMessage Mime, string AssignedRemoteFolderId); } diff --git a/Wino.Core.Domain/Models/MailItem/MailListInitializationOptions.cs b/Wino.Core.Domain/Models/MailItem/MailListInitializationOptions.cs index 170adcf6..3b8b652a 100644 --- a/Wino.Core.Domain/Models/MailItem/MailListInitializationOptions.cs +++ b/Wino.Core.Domain/Models/MailItem/MailListInitializationOptions.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain.Enums; +using Wino.Domain.Models.Folders; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { public record MailListInitializationOptions(IEnumerable Folders, FilterOptionType FilterType, diff --git a/Wino.Core.Domain/Models/MailItem/MailOperationPreperationRequest.cs b/Wino.Core.Domain/Models/MailItem/MailOperationPreperationRequest.cs index 1a1758a1..e12b0ca2 100644 --- a/Wino.Core.Domain/Models/MailItem/MailOperationPreperationRequest.cs +++ b/Wino.Core.Domain/Models/MailItem/MailOperationPreperationRequest.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Models.Folders; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { /// /// Encapsulates the options for preparing requests to execute mail operations for mail items like Move, Delete, MarkAsRead, etc. diff --git a/Wino.Core.Domain/Models/MailItem/MimeMessageInformation.cs b/Wino.Core.Domain/Models/MailItem/MimeMessageInformation.cs index ce8b4404..fdad15d8 100644 --- a/Wino.Core.Domain/Models/MailItem/MimeMessageInformation.cs +++ b/Wino.Core.Domain/Models/MailItem/MimeMessageInformation.cs @@ -1,6 +1,6 @@ using MimeKit; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { /// /// Encapsulates MimeMessage and the path to the file. diff --git a/Wino.Core.Domain/Models/MailItem/OutlookSpecialFolderIdInformation.cs b/Wino.Core.Domain/Models/MailItem/OutlookSpecialFolderIdInformation.cs index 9eadd52a..77dde9fa 100644 --- a/Wino.Core.Domain/Models/MailItem/OutlookSpecialFolderIdInformation.cs +++ b/Wino.Core.Domain/Models/MailItem/OutlookSpecialFolderIdInformation.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { /// /// Class that holds immutable information about special folders in Outlook. diff --git a/Wino.Core.Domain/Models/MailItem/SendDraftPreparationRequest.cs b/Wino.Core.Domain/Models/MailItem/SendDraftPreparationRequest.cs index f1159931..ae79c56c 100644 --- a/Wino.Core.Domain/Models/MailItem/SendDraftPreparationRequest.cs +++ b/Wino.Core.Domain/Models/MailItem/SendDraftPreparationRequest.cs @@ -1,7 +1,7 @@ using MimeKit; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { public record SendDraftPreparationRequest(MailCopy MailItem, MimeMessage Mime, MailItemFolder DraftFolder, MailItemFolder SentFolder, MailAccountPreferences AccountPreferences); } diff --git a/Wino.Core.Domain/Models/MailItem/ThreadMailItem.cs b/Wino.Core.Domain/Models/MailItem/ThreadMailItem.cs index 7a0d0656..50cce76a 100644 --- a/Wino.Core.Domain/Models/MailItem/ThreadMailItem.cs +++ b/Wino.Core.Domain/Models/MailItem/ThreadMailItem.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { public class ThreadMailItem : IMailItemThread { diff --git a/Wino.Core.Domain/Models/MailItem/ToggleRequestRule.cs b/Wino.Core.Domain/Models/MailItem/ToggleRequestRule.cs index 9ed10f48..a1f5db33 100644 --- a/Wino.Core.Domain/Models/MailItem/ToggleRequestRule.cs +++ b/Wino.Core.Domain/Models/MailItem/ToggleRequestRule.cs @@ -1,7 +1,7 @@ using System; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.MailItem +namespace Wino.Domain.Models.MailItem { /// /// Defines a single rule for toggling user actions if needed. diff --git a/Wino.Core.Domain/Models/Menus/MailOperationMenuItem.cs b/Wino.Core.Domain/Models/Menus/MailOperationMenuItem.cs index c14d7604..54d05e6f 100644 --- a/Wino.Core.Domain/Models/Menus/MailOperationMenuItem.cs +++ b/Wino.Core.Domain/Models/Menus/MailOperationMenuItem.cs @@ -1,7 +1,7 @@ -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; -namespace Wino.Core.Domain.Models.Menus +namespace Wino.Domain.Models.Menus { public class MailOperationMenuItem : MenuOperationItemBase, IMenuOperation { diff --git a/Wino.Core.Domain/Models/Menus/MenuOperationItemBase.cs b/Wino.Core.Domain/Models/Menus/MenuOperationItemBase.cs index 462cfe14..0357acdd 100644 --- a/Wino.Core.Domain/Models/Menus/MenuOperationItemBase.cs +++ b/Wino.Core.Domain/Models/Menus/MenuOperationItemBase.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Models.Menus +namespace Wino.Domain.Models.Menus { public class MenuOperationItemBase where TOperation : Enum { diff --git a/Wino.Core/Mime/HtmlPreviewVisitor.cs b/Wino.Core.Domain/Models/Mime/HtmlPreviewVisitor.cs similarity index 98% rename from Wino.Core/Mime/HtmlPreviewVisitor.cs rename to Wino.Core.Domain/Models/Mime/HtmlPreviewVisitor.cs index 7c1e9029..823e841f 100644 --- a/Wino.Core/Mime/HtmlPreviewVisitor.cs +++ b/Wino.Core.Domain/Models/Mime/HtmlPreviewVisitor.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.IO; -using MimeKit; +using MimeKit; using MimeKit.Text; using MimeKit.Tnef; -namespace Wino.Core.Mime +namespace Wino.Domain.Models.Mime { /// /// Visits a MimeMessage and generates HTML suitable to be rendered by a browser control. diff --git a/Wino.Core.Domain/Models/Navigation/NavigateMailFolderEventArgs.cs b/Wino.Core.Domain/Models/Navigation/NavigateMailFolderEventArgs.cs index de6a38ea..95b248f9 100644 --- a/Wino.Core.Domain/Models/Navigation/NavigateMailFolderEventArgs.cs +++ b/Wino.Core.Domain/Models/Navigation/NavigateMailFolderEventArgs.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; -namespace Wino.Core.Domain.Models.Navigation +namespace Wino.Domain.Models.Navigation { public class NavigateMailFolderEventArgs { diff --git a/Wino.Core.Domain/Models/Navigation/NavigationMode.cs b/Wino.Core.Domain/Models/Navigation/NavigationMode.cs index fbeb0fdd..967dbafe 100644 --- a/Wino.Core.Domain/Models/Navigation/NavigationMode.cs +++ b/Wino.Core.Domain/Models/Navigation/NavigationMode.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Models.Navigation +namespace Wino.Domain.Models.Navigation { public enum NavigationMode { diff --git a/Wino.Core.Domain/Models/Navigation/NavigationTransitionType.cs b/Wino.Core.Domain/Models/Navigation/NavigationTransitionType.cs index 9a78c0fa..b8f75717 100644 --- a/Wino.Core.Domain/Models/Navigation/NavigationTransitionType.cs +++ b/Wino.Core.Domain/Models/Navigation/NavigationTransitionType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Models.Navigation +namespace Wino.Domain.Models.Navigation { public enum NavigationTransitionType { diff --git a/Wino.Core.Domain/Models/Personalization/AppThemeBase.cs b/Wino.Core.Domain/Models/Personalization/AppThemeBase.cs index f9b74a40..803baf29 100644 --- a/Wino.Core.Domain/Models/Personalization/AppThemeBase.cs +++ b/Wino.Core.Domain/Models/Personalization/AppThemeBase.cs @@ -1,8 +1,8 @@ using System; using System.Threading.Tasks; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Personalization +namespace Wino.Domain.Models.Personalization { /// /// Base class for all app themes. diff --git a/Wino.Core.Domain/Models/Personalization/CustomThemeMetadata.cs b/Wino.Core.Domain/Models/Personalization/CustomThemeMetadata.cs index e6206725..667845ca 100644 --- a/Wino.Core.Domain/Models/Personalization/CustomThemeMetadata.cs +++ b/Wino.Core.Domain/Models/Personalization/CustomThemeMetadata.cs @@ -1,6 +1,6 @@ using System; -namespace Wino.Core.Domain.Models.Personalization +namespace Wino.Domain.Models.Personalization { public class CustomThemeMetadata { diff --git a/Wino.Core.Domain/Models/Personalization/ElementThemeContainer.cs b/Wino.Core.Domain/Models/Personalization/ElementThemeContainer.cs index 42f79fc5..26b5522f 100644 --- a/Wino.Core.Domain/Models/Personalization/ElementThemeContainer.cs +++ b/Wino.Core.Domain/Models/Personalization/ElementThemeContainer.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Personalization +namespace Wino.Domain.Models.Personalization { public class ElementThemeContainer { diff --git a/Wino.Core.Domain/Models/Personalization/MailListPaneLengthPreferences.cs b/Wino.Core.Domain/Models/Personalization/MailListPaneLengthPreferences.cs index 23841893..c065ad9d 100644 --- a/Wino.Core.Domain/Models/Personalization/MailListPaneLengthPreferences.cs +++ b/Wino.Core.Domain/Models/Personalization/MailListPaneLengthPreferences.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Models.Personalization +namespace Wino.Domain.Models.Personalization { public record MailListPaneLengthPreferences(string Title, double Length); } diff --git a/Wino.Core.Domain/Models/Reader/EditorToolbarSection.cs b/Wino.Core.Domain/Models/Reader/EditorToolbarSection.cs index e52fdea1..6d68fd2b 100644 --- a/Wino.Core.Domain/Models/Reader/EditorToolbarSection.cs +++ b/Wino.Core.Domain/Models/Reader/EditorToolbarSection.cs @@ -1,6 +1,7 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Reader +namespace Wino.Domain.Models.Reader { public class EditorToolbarSection { diff --git a/Wino.Core.Domain/Models/Reader/FilterOption.cs b/Wino.Core.Domain/Models/Reader/FilterOption.cs index 883a8174..cd47bb7c 100644 --- a/Wino.Core.Domain/Models/Reader/FilterOption.cs +++ b/Wino.Core.Domain/Models/Reader/FilterOption.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Reader +namespace Wino.Domain.Models.Reader { public class FilterOption { diff --git a/Wino.Core.Domain/Models/Reader/MailRenderModel.cs b/Wino.Core.Domain/Models/Reader/MailRenderModel.cs index 918457a2..efefc8f1 100644 --- a/Wino.Core.Domain/Models/Reader/MailRenderModel.cs +++ b/Wino.Core.Domain/Models/Reader/MailRenderModel.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using MimeKit; -namespace Wino.Core.Domain.Models.Reader +namespace Wino.Domain.Models.Reader { /// /// Final model to be passed to renderer page. diff --git a/Wino.Core.Domain/Models/Reader/MailRenderingOptions.cs b/Wino.Core.Domain/Models/Reader/MailRenderingOptions.cs index 739592aa..9c92fd54 100644 --- a/Wino.Core.Domain/Models/Reader/MailRenderingOptions.cs +++ b/Wino.Core.Domain/Models/Reader/MailRenderingOptions.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Models.Reader +namespace Wino.Domain.Models.Reader { /// /// Rendering options for mail. diff --git a/Wino.Core.Domain/Models/Reader/ReaderFontModel.cs b/Wino.Core.Domain/Models/Reader/ReaderFontModel.cs index 7530e92a..b252e061 100644 --- a/Wino.Core.Domain/Models/Reader/ReaderFontModel.cs +++ b/Wino.Core.Domain/Models/Reader/ReaderFontModel.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Reader +namespace Wino.Domain.Models.Reader { public record ReaderFontModel(ReaderFont Font, string FontFamilyName); } diff --git a/Wino.Core.Domain/Models/Reader/SortingOption.cs b/Wino.Core.Domain/Models/Reader/SortingOption.cs index 3d253453..35524fe9 100644 --- a/Wino.Core.Domain/Models/Reader/SortingOption.cs +++ b/Wino.Core.Domain/Models/Reader/SortingOption.cs @@ -1,9 +1,8 @@ -using System.Collections.Generic; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Comparers; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Enums; +using Wino.Domain.Models.Comparers; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Models.Reader +namespace Wino.Domain.Models.Reader { public class SortingOption { diff --git a/Wino.Core.Domain/Models/Reader/WebViewMessage.cs b/Wino.Core.Domain/Models/Reader/WebViewMessage.cs index f3a462b1..2445ceac 100644 --- a/Wino.Core.Domain/Models/Reader/WebViewMessage.cs +++ b/Wino.Core.Domain/Models/Reader/WebViewMessage.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace Wino.Core.Domain.Models.Reader +namespace Wino.Domain.Models.Reader { /// /// Used to pass messages from the webview to the app. diff --git a/Wino.Core.Domain/Models/Requests/RequestBase.cs b/Wino.Core.Domain/Models/Requests/RequestBase.cs index bb2281cb..6f2fa31e 100644 --- a/Wino.Core.Domain/Models/Requests/RequestBase.cs +++ b/Wino.Core.Domain/Models/Requests/RequestBase.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; -namespace Wino.Core.Domain.Models.Requests +namespace Wino.Domain.Models.Requests { public abstract record RequestBase(MailCopy Item, MailSynchronizerOperation Operation) : IRequest where TBatchRequestType : IBatchChangeRequest diff --git a/Wino.Core.Domain/Models/Store/StoreProductType.cs b/Wino.Core.Domain/Models/Store/StoreProductType.cs index 5c82003e..5aaf938d 100644 --- a/Wino.Core.Domain/Models/Store/StoreProductType.cs +++ b/Wino.Core.Domain/Models/Store/StoreProductType.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain.Models.Store +namespace Wino.Domain.Models.Store { public enum StoreProductType { diff --git a/Wino.Core.Domain/Models/Synchronization/SynchronizationOptions.cs b/Wino.Core.Domain/Models/Synchronization/SynchronizationOptions.cs index 31ced1de..3a225f5d 100644 --- a/Wino.Core.Domain/Models/Synchronization/SynchronizationOptions.cs +++ b/Wino.Core.Domain/Models/Synchronization/SynchronizationOptions.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; -namespace Wino.Core.Domain.Models.Synchronization +namespace Wino.Domain.Models.Synchronization { public class SynchronizationOptions { diff --git a/Wino.Core.Domain/Models/Synchronization/SynchronizationResult.cs b/Wino.Core.Domain/Models/Synchronization/SynchronizationResult.cs index c10a7b96..f057d462 100644 --- a/Wino.Core.Domain/Models/Synchronization/SynchronizationResult.cs +++ b/Wino.Core.Domain/Models/Synchronization/SynchronizationResult.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Enums; +using Wino.Domain.Models.MailItem; -namespace Wino.Core.Domain.Models.Synchronization +namespace Wino.Domain.Models.Synchronization { public class SynchronizationResult { diff --git a/Wino.Core.Domain/Models/Translations/AppLanguageModel.cs b/Wino.Core.Domain/Models/Translations/AppLanguageModel.cs index 65032c61..aa721287 100644 --- a/Wino.Core.Domain/Models/Translations/AppLanguageModel.cs +++ b/Wino.Core.Domain/Models/Translations/AppLanguageModel.cs @@ -1,6 +1,6 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; -namespace Wino.Core.Domain.Models.Translations +namespace Wino.Domain.Models.Translations { public record AppLanguageModel(AppLanguage Language, string DisplayName); } diff --git a/Wino.Core.Domain/Translations/WinoTranslationDictionary.cs b/Wino.Core.Domain/Translations/WinoTranslationDictionary.cs index 833c2206..ee218cdb 100644 --- a/Wino.Core.Domain/Translations/WinoTranslationDictionary.cs +++ b/Wino.Core.Domain/Translations/WinoTranslationDictionary.cs @@ -1,11 +1,11 @@  using System.Reflection; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; #if !NET8_0 using System.IO; using System.Collections.Generic; #endif -namespace Wino.Core.Domain.Translations +namespace Wino.Domain.Translations { public class WinoTranslationDictionary : Dictionary { diff --git a/Wino.Core.Domain/Translator.Designer.cs b/Wino.Core.Domain/Translator.Designer.cs index db911b39..83ad7198 100644 --- a/Wino.Core.Domain/Translator.Designer.cs +++ b/Wino.Core.Domain/Translator.Designer.cs @@ -1,17 +1,17 @@  -namespace Wino.Core.Domain +namespace Wino.Domain { public class Translator { - private static global::Wino.Core.Domain.Translations.WinoTranslationDictionary _dictionary; + private static global::Wino.Domain.Translations.WinoTranslationDictionary _dictionary; - public static global::Wino.Core.Domain.Translations.WinoTranslationDictionary Resources + public static global::Wino.Domain.Translations.WinoTranslationDictionary Resources { get { if (_dictionary == null) { - _dictionary = new global::Wino.Core.Domain.Translations.WinoTranslationDictionary(); + _dictionary = new global::Wino.Domain.Translations.WinoTranslationDictionary(); } return _dictionary; diff --git a/Wino.Core.Domain/Translator.tt b/Wino.Core.Domain/Translator.tt index 296dee9b..dd263482 100644 --- a/Wino.Core.Domain/Translator.tt +++ b/Wino.Core.Domain/Translator.tt @@ -16,19 +16,19 @@ var resourceKeys = JsonSerializer.Deserialize>(allText); #> -namespace Wino.Core.Domain +namespace Wino.Domain { public class Translator { - private static global::Wino.Core.Domain.Translations.WinoTranslationDictionary _dictionary; + private static global::Wino.Domain.Translations.WinoTranslationDictionary _dictionary; - public static global::Wino.Core.Domain.Translations.WinoTranslationDictionary Resources + public static global::Wino.Domain.Translations.WinoTranslationDictionary Resources { get { if (_dictionary == null) { - _dictionary = new global::Wino.Core.Domain.Translations.WinoTranslationDictionary(); + _dictionary = new global::Wino.Domain.Translations.WinoTranslationDictionary(); } return _dictionary; diff --git a/Wino.Core.Domain/Wino.Core.Domain.csproj b/Wino.Core.Domain/Wino.Domain.csproj similarity index 96% rename from Wino.Core.Domain/Wino.Core.Domain.csproj rename to Wino.Core.Domain/Wino.Domain.csproj index c21bca54..631ca06a 100644 --- a/Wino.Core.Domain/Wino.Core.Domain.csproj +++ b/Wino.Core.Domain/Wino.Domain.csproj @@ -5,8 +5,8 @@ enable disable bin\ - Wino.Core.Domain - Wino.Core.Domain + Wino.Domain + Wino.Domain diff --git a/Wino.Core.Domain/WinoErrors.cs b/Wino.Core.Domain/WinoErrors.cs index faae181f..2abdb8bd 100644 --- a/Wino.Core.Domain/WinoErrors.cs +++ b/Wino.Core.Domain/WinoErrors.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.Domain +namespace Wino.Domain { /// /// Error codes for Wino application. diff --git a/Wino.Core/Authenticators/CustomAuthenticator.cs b/Wino.Core/Authenticators/CustomAuthenticator.cs deleted file mode 100644 index a254d66c..00000000 --- a/Wino.Core/Authenticators/CustomAuthenticator.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Threading.Tasks; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Services; - -namespace Wino.Core.Authenticators -{ - public class CustomAuthenticator : BaseAuthenticator, IAuthenticator - { - public CustomAuthenticator(ITokenService tokenService) : base(tokenService) { } - - public override MailProviderType ProviderType => MailProviderType.IMAP4; - - public string ClientId => throw new NotImplementedException(); // Not needed. - - public event EventHandler InteractiveAuthenticationRequired; - - public void CancelAuthorization() { } - - public void ContinueAuthorization(Uri authorizationResponseUri) { } - - public Task GenerateTokenAsync(MailAccount account, bool saveToken) - { - throw new NotImplementedException(); - } - - public Task GetTokenAsync(MailAccount account) - { - throw new NotImplementedException(); - } - } -} diff --git a/Wino.Core/Authenticators/YahooAuthenticator.cs b/Wino.Core/Authenticators/YahooAuthenticator.cs deleted file mode 100644 index f42842ca..00000000 --- a/Wino.Core/Authenticators/YahooAuthenticator.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Threading.Tasks; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Services; - -namespace Wino.Core.Authenticators -{ - public class YahooAuthenticator : BaseAuthenticator, IAuthenticator - { - public YahooAuthenticator(ITokenService tokenService) : base(tokenService) { } - - public override MailProviderType ProviderType => MailProviderType.Yahoo; - - public string ClientId => throw new NotImplementedException(); - - public event EventHandler InteractiveAuthenticationRequired; - - public void CancelAuthorization() - { - throw new NotImplementedException(); - } - - public void ContinueAuthorization(Uri authorizationResponseUri) - { - throw new NotImplementedException(); - } - - public Task GenerateTokenAsync(MailAccount account, bool saveToken) - { - throw new NotImplementedException(); - } - - public Task GetTokenAsync(MailAccount account) - { - throw new NotImplementedException(); - } - } -} diff --git a/Wino.Core/Extensions/FolderTreeExtensions.cs b/Wino.Core/Extensions/FolderTreeExtensions.cs deleted file mode 100644 index 18cf16ca..00000000 --- a/Wino.Core/Extensions/FolderTreeExtensions.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.MenuItems; - -namespace Wino.Core.Extensions -{ - public static class FolderTreeExtensions - { - private static MenuItemBase GetMenuItemByFolderRecursive(IMailItemFolder structure, AccountMenuItem parentAccountMenuItem, IMenuItem parentFolderItem) - { - MenuItemBase parentMenuItem = new FolderMenuItem(structure, parentAccountMenuItem.Parameter, parentFolderItem); - - var childStructures = structure.ChildFolders; - - foreach (var childFolder in childStructures) - { - if (childFolder == null) continue; - - // Folder menu item. - var subChildrenFolderTree = GetMenuItemByFolderRecursive(childFolder, parentAccountMenuItem, parentMenuItem); - - if (subChildrenFolderTree is FolderMenuItem folderItem) - { - parentMenuItem.SubMenuItems.Add(folderItem); - } - } - - return parentMenuItem; - } - } -} diff --git a/Wino.Core/Extensions/MimeExtensions.cs b/Wino.Core/Extensions/MimeExtensions.cs deleted file mode 100644 index 624645d1..00000000 --- a/Wino.Core/Extensions/MimeExtensions.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.IO; -using System.Text; -using Google.Apis.Gmail.v1.Data; -using MimeKit; -using MimeKit.IO; -using MimeKit.IO.Filters; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; - -namespace Wino.Core.Extensions -{ - public static class MimeExtensions - { - /// - /// Returns MimeKit.MimeMessage instance for this GMail Message's Raw content. - /// - /// GMail message. - public static MimeMessage GetGmailMimeMessage(this Message message) - { - if (message == null || message.Raw == null) - return null; - - // Gmail raw is not base64 but base64Safe. We need to remove this HTML things. - var base64Encoded = message.Raw.Replace(",", "=").Replace("-", "+").Replace("_", "/"); - - byte[] bytes = Encoding.ASCII.GetBytes(base64Encoded); - - var stream = new MemoryStream(bytes); - - // This method will dispose outer stream. - - using (stream) - { - using var filtered = new FilteredStream(stream); - filtered.Add(DecoderFilter.Create(ContentEncoding.Base64)); - - return MimeMessage.Load(filtered); - } - } - - public static AddressInformation ToAddressInformation(this MailboxAddress address) - { - if (address == null) - return new AddressInformation() { Name = Translator.UnknownSender, Address = Translator.UnknownAddress }; - - if (string.IsNullOrEmpty(address.Name)) - address.Name = address.Address; - - return new AddressInformation() { Name = address.Name, Address = address.Address }; - } - } -} diff --git a/Wino.Core/Integration/Processors/DefaultChangeProcessor.cs b/Wino.Core/Integration/Processors/DefaultChangeProcessor.cs deleted file mode 100644 index 990856eb..00000000 --- a/Wino.Core/Integration/Processors/DefaultChangeProcessor.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using MimeKit; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Synchronization; -using Wino.Core.Services; - -namespace Wino.Core.Integration.Processors -{ - /// - /// Database change processor that handles common operations for all synchronizers. - /// When a synchronizer detects a change, it should call the appropriate method in this class to reflect the change in the database. - /// Different synchronizers might need additional implementations. - /// , and - /// None of the synchronizers can directly change anything in the database. - /// - public interface IDefaultChangeProcessor - { - Task UpdateAccountDeltaSynchronizationIdentifierAsync(Guid accountId, string deltaSynchronizationIdentifier); - Task CreateAssignmentAsync(Guid accountId, string mailCopyId, string remoteFolderId); - Task DeleteAssignmentAsync(Guid accountId, string mailCopyId, string remoteFolderId); - Task ChangeMailReadStatusAsync(string mailCopyId, bool isRead); - Task ChangeFlagStatusAsync(string mailCopyId, bool isFlagged); - Task CreateMailAsync(Guid AccountId, NewMailItemPackage package); - Task DeleteMailAsync(Guid accountId, string mailId); - Task> GetDownloadedUnreadMailsAsync(Guid accountId, IEnumerable downloadedMailCopyIds); - Task SaveMimeFileAsync(Guid fileId, MimeMessage mimeMessage, Guid accountId); - Task DeleteFolderAsync(Guid accountId, string remoteFolderId); - Task InsertFolderAsync(MailItemFolder folder); - Task UpdateFolderAsync(MailItemFolder folder); - - /// - /// Returns the list of folders that are available for account. - /// - /// Account id to get folders for. - /// All folders. - Task> GetLocalFoldersAsync(Guid accountId); - - Task> GetSynchronizationFoldersAsync(SynchronizationOptions options); - - Task MapLocalDraftAsync(Guid accountId, Guid localDraftCopyUniqueId, string newMailCopyId, string newDraftId, string newThreadId); - Task UpdateFolderLastSyncDateAsync(Guid folderId); - - Task> GetExistingFoldersAsync(Guid accountId); - } - - public interface IGmailChangeProcessor : IDefaultChangeProcessor - { - Task MapLocalDraftAsync(string mailCopyId, string newDraftId, string newThreadId); - } - - public interface IOutlookChangeProcessor : IDefaultChangeProcessor - { - /// - /// Interrupted initial synchronization may cause downloaded mails to be saved in the database twice. - /// Since downloading mime is costly in Outlook, we need to check if the actual copy of the message has been saved before. - /// - /// MailCopyId of the message. - /// Whether the mime has b - Task IsMailExistsAsync(string messageId); - - /// - /// Updates Folder's delta synchronization identifier. - /// Only used in Outlook since it does per-folder sync. - /// - /// Folder id - /// New synchronization identifier. - /// New identifier if success. - Task UpdateFolderDeltaSynchronizationIdentifierAsync(Guid folderId, string deltaSynchronizationIdentifier); - } - - public interface IImapChangeProcessor : IDefaultChangeProcessor - { - /// - /// Returns all known uids for the given folder. - /// - /// Folder id to retrieve uIds for. - Task> GetKnownUidsForFolderAsync(Guid folderId); - } - - public class DefaultChangeProcessor(IDatabaseService databaseService, - IFolderService folderService, - IMailService mailService, - IAccountService accountService, - IMimeFileService mimeFileService) : BaseDatabaseService(databaseService), IDefaultChangeProcessor - { - protected IMailService MailService = mailService; - - protected IFolderService FolderService = folderService; - private readonly IAccountService _accountService = accountService; - private readonly IMimeFileService _mimeFileService = mimeFileService; - - public Task UpdateAccountDeltaSynchronizationIdentifierAsync(Guid accountId, string synchronizationDeltaIdentifier) - => _accountService.UpdateSynchronizationIdentifierAsync(accountId, synchronizationDeltaIdentifier); - - public Task ChangeFlagStatusAsync(string mailCopyId, bool isFlagged) - => MailService.ChangeFlagStatusAsync(mailCopyId, isFlagged); - - public Task ChangeMailReadStatusAsync(string mailCopyId, bool isRead) - => MailService.ChangeReadStatusAsync(mailCopyId, isRead); - - public Task DeleteAssignmentAsync(Guid accountId, string mailCopyId, string remoteFolderId) - => MailService.DeleteAssignmentAsync(accountId, mailCopyId, remoteFolderId); - - public Task CreateAssignmentAsync(Guid accountId, string mailCopyId, string remoteFolderId) - => MailService.CreateAssignmentAsync(accountId, mailCopyId, remoteFolderId); - - public Task DeleteMailAsync(Guid accountId, string mailId) - => MailService.DeleteMailAsync(accountId, mailId); - - public Task CreateMailAsync(Guid accountId, NewMailItemPackage package) - => MailService.CreateMailAsync(accountId, package); - - public Task> GetExistingFoldersAsync(Guid accountId) - => FolderService.GetFoldersAsync(accountId); - - public Task MapLocalDraftAsync(Guid accountId, Guid localDraftCopyUniqueId, string newMailCopyId, string newDraftId, string newThreadId) - => MailService.MapLocalDraftAsync(accountId, localDraftCopyUniqueId, newMailCopyId, newDraftId, newThreadId); - - public Task> GetLocalFoldersAsync(Guid accountId) - => FolderService.GetFoldersAsync(accountId); - - public Task> GetSynchronizationFoldersAsync(SynchronizationOptions options) - => FolderService.GetSynchronizationFoldersAsync(options); - - public Task DeleteFolderAsync(Guid accountId, string remoteFolderId) - => FolderService.DeleteFolderAsync(accountId, remoteFolderId); - - public Task InsertFolderAsync(MailItemFolder folder) - => FolderService.InsertFolderAsync(folder); - - public Task UpdateFolderAsync(MailItemFolder folder) - => FolderService.UpdateFolderAsync(folder); - - public Task> GetDownloadedUnreadMailsAsync(Guid accountId, IEnumerable downloadedMailCopyIds) - => MailService.GetDownloadedUnreadMailsAsync(accountId, downloadedMailCopyIds); - - - - public Task SaveMimeFileAsync(Guid fileId, MimeMessage mimeMessage, Guid accountId) - => _mimeFileService.SaveMimeMessageAsync(fileId, mimeMessage, accountId); - - public Task UpdateFolderLastSyncDateAsync(Guid folderId) - => FolderService.UpdateFolderLastSyncDateAsync(folderId); - } -} diff --git a/Wino.Core/Integration/Threading/GmailThreadingStrategy.cs b/Wino.Core/Integration/Threading/GmailThreadingStrategy.cs deleted file mode 100644 index 5cd0ce1c..00000000 --- a/Wino.Core/Integration/Threading/GmailThreadingStrategy.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Wino.Core.Domain.Interfaces; -using Wino.Core.Services; - -namespace Wino.Core.Integration.Threading -{ - public class GmailThreadingStrategy : APIThreadingStrategy - { - public GmailThreadingStrategy(IDatabaseService databaseService, IFolderService folderService) : base(databaseService, folderService) { } - } -} diff --git a/Wino.Core/Messages/Accounts/AccountMenuItemExtended.cs b/Wino.Core/Messages/Accounts/AccountMenuItemExtended.cs deleted file mode 100644 index 737ae9c3..00000000 --- a/Wino.Core/Messages/Accounts/AccountMenuItemExtended.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using Wino.Core.Domain.Models.MailItem; - -namespace Wino.Core.Messages.Accounts -{ - /// - /// When menu item for the account is requested to be extended. - /// Additional properties are also supported to navigate to correct IMailItem. - /// - /// Account to extend menu item for. - /// Folder to select after expansion. - /// Mail item to select if possible in the expanded folder. - public record AccountMenuItemExtended(Guid FolderId, IMailItem NavigateMailItem); -} diff --git a/Wino.Core/Messages/Accounts/AccountMenuItemsReordered.cs b/Wino.Core/Messages/Accounts/AccountMenuItemsReordered.cs deleted file mode 100644 index d9a9d74b..00000000 --- a/Wino.Core/Messages/Accounts/AccountMenuItemsReordered.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Wino.Core.Messages.Accounts -{ - /// - /// Emitted when account menu items are reordered. - /// - /// New order info. - public record AccountMenuItemsReordered(Dictionary newOrderDictionary); -} diff --git a/Wino.Core/Messages/Accounts/AccountsMenuRefreshRequested.cs b/Wino.Core/Messages/Accounts/AccountsMenuRefreshRequested.cs deleted file mode 100644 index d6848622..00000000 --- a/Wino.Core/Messages/Accounts/AccountsMenuRefreshRequested.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Wino.Core.Messages.Accounts -{ - /// - /// When a full menu refresh for accounts menu is requested. - /// - public record AccountsMenuRefreshRequested(bool AutomaticallyNavigateFirstItem = true); -} diff --git a/Wino.Core/Messages/Authorization/ProtocolAuthorizationCallbackReceived.cs b/Wino.Core/Messages/Authorization/ProtocolAuthorizationCallbackReceived.cs deleted file mode 100644 index d748f6df..00000000 --- a/Wino.Core/Messages/Authorization/ProtocolAuthorizationCallbackReceived.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace Wino.Core.Messages.Authorization -{ - /// - /// When Google authentication makes a callback to the app via protocol activation to the app. - /// - /// Callback Uri that Google returned. - public record ProtocolAuthorizationCallbackReceived(Uri AuthorizationResponseUri); -} diff --git a/Wino.Core/Messages/Mails/CancelRenderingContentRequested.cs b/Wino.Core/Messages/Mails/CancelRenderingContentRequested.cs deleted file mode 100644 index 0df0be2a..00000000 --- a/Wino.Core/Messages/Mails/CancelRenderingContentRequested.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Wino.Core.Messages.Mails -{ - /// - /// When rendered html is requested to cancel. - /// - public record CancelRenderingContentRequested; -} diff --git a/Wino.Core/Messages/Mails/ClearMailSelectionsRequested.cs b/Wino.Core/Messages/Mails/ClearMailSelectionsRequested.cs deleted file mode 100644 index d38af5f4..00000000 --- a/Wino.Core/Messages/Mails/ClearMailSelectionsRequested.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Wino.Core.Messages.Mails -{ - /// - /// When reset all mail selections requested. - /// - public record ClearMailSelectionsRequested; -} diff --git a/Wino.Core/Messages/Mails/DisposeRenderingFrameRequested.cs b/Wino.Core/Messages/Mails/DisposeRenderingFrameRequested.cs deleted file mode 100644 index 9de7562f..00000000 --- a/Wino.Core/Messages/Mails/DisposeRenderingFrameRequested.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Wino.Core.Messages.Mails -{ - /// - /// When rendering frame should be disposed. - /// - public class DisposeRenderingFrameRequested { } -} diff --git a/Wino.Core/Messages/Mails/HtmlRenderingRequested.cs b/Wino.Core/Messages/Mails/HtmlRenderingRequested.cs deleted file mode 100644 index f7b572ec..00000000 --- a/Wino.Core/Messages/Mails/HtmlRenderingRequested.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Wino.Core.Messages.Mails -{ - /// - /// When existing a new html is requested to be rendered due to mail selection or signature. - /// - /// HTML to render in WebView2. - public record HtmlRenderingRequested(string HtmlBody); -} diff --git a/Wino.Core/Messages/Mails/ImapSetupBackNavigationRequested.cs b/Wino.Core/Messages/Mails/ImapSetupBackNavigationRequested.cs deleted file mode 100644 index e8762dc2..00000000 --- a/Wino.Core/Messages/Mails/ImapSetupBackNavigationRequested.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Wino.Core.Messages.Mails -{ - /// - /// When IMAP setup dialog requestes back breadcrumb navigation. - /// Not providing PageType will go back to previous page by doing back navigation. - /// - /// Type to go back. - /// Back parameters. - public record ImapSetupBackNavigationRequested(Type PageType = null, object Parameter = null); -} diff --git a/Wino.Core/Messages/Mails/ImapSetupDismissRequested.cs b/Wino.Core/Messages/Mails/ImapSetupDismissRequested.cs deleted file mode 100644 index 5a02a441..00000000 --- a/Wino.Core/Messages/Mails/ImapSetupDismissRequested.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Wino.Core.Domain.Entities; - -namespace Wino.Core.Messages.Mails -{ - /// - /// When user asked to dismiss IMAP setup dialog. - /// - /// Validated server information that is ready to be saved to database. - public record ImapSetupDismissRequested(CustomServerInformation CompletedServerInformation = null); -} diff --git a/Wino.Core/Messages/Mails/ImapSetupNavigationRequested.cs b/Wino.Core/Messages/Mails/ImapSetupNavigationRequested.cs deleted file mode 100644 index 4c74be90..00000000 --- a/Wino.Core/Messages/Mails/ImapSetupNavigationRequested.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace Wino.Core.Messages.Mails -{ - /// - /// When IMAP setup dialog breadcrumb navigation requested. - /// - /// Page type to navigate. - /// Navigation parameters. - public record ImapSetupNavigationRequested(Type PageType, object Parameter); -} diff --git a/Wino.Core/Messages/Mails/MailItemNavigationRequested.cs b/Wino.Core/Messages/Mails/MailItemNavigationRequested.cs deleted file mode 100644 index f64721bf..00000000 --- a/Wino.Core/Messages/Mails/MailItemNavigationRequested.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace Wino.Core.Messages.Mails -{ - /// - /// When a IMailItem needs to be navigated (or selected) - /// - /// UniqueId of the mail to navigate. - /// Whether navigated item should be scrolled to or not.. - public record MailItemNavigationRequested(Guid UniqueMailId, bool ScrollToItem = false); -} diff --git a/Wino.Core/Messages/Mails/NavigateMailFolderEvent.cs b/Wino.Core/Messages/Mails/NavigateMailFolderEvent.cs deleted file mode 100644 index d6814c92..00000000 --- a/Wino.Core/Messages/Mails/NavigateMailFolderEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Threading.Tasks; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Navigation; - -namespace Wino.Core.Messages.Mails -{ - /// - /// Selects the given FolderMenuItem in the shell folders list. - /// - public class NavigateMailFolderEvent : NavigateMailFolderEventArgs - { - public NavigateMailFolderEvent(IBaseFolderMenuItem baseFolderMenuItem, TaskCompletionSource folderInitLoadAwaitTask = null) - : base(baseFolderMenuItem, folderInitLoadAwaitTask) - { - } - } -} diff --git a/Wino.Core/Messages/Mails/RefreshUnreadCountsMessage.cs b/Wino.Core/Messages/Mails/RefreshUnreadCountsMessage.cs deleted file mode 100644 index 5e06029a..00000000 --- a/Wino.Core/Messages/Mails/RefreshUnreadCountsMessage.cs +++ /dev/null @@ -1,6 +0,0 @@ -using System; - -namespace Wino.Core.Messages.Mails -{ - public record RefreshUnreadCountsMessage(Guid AccountId); -} diff --git a/Wino.Core/Messages/Mails/SaveAsPDFRequested.cs b/Wino.Core/Messages/Mails/SaveAsPDFRequested.cs deleted file mode 100644 index e5d4e55c..00000000 --- a/Wino.Core/Messages/Mails/SaveAsPDFRequested.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Wino.Core.Messages.Mails -{ - /// - /// When mail save as PDF requested. - /// - public record SaveAsPDFRequested(string FileSavePath); -} diff --git a/Wino.Core/Messages/Mails/SelectedMailItemsChanged.cs b/Wino.Core/Messages/Mails/SelectedMailItemsChanged.cs deleted file mode 100644 index 44ac929e..00000000 --- a/Wino.Core/Messages/Mails/SelectedMailItemsChanged.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Wino.Core.Messages.Mails -{ - /// - /// When selected mail count is changed. - /// - /// New selected mail count. - public record SelectedMailItemsChanged(int SelectedItemCount); -} diff --git a/Wino.Core/Messages/Navigation/BackBreadcrumNavigationRequested.cs b/Wino.Core/Messages/Navigation/BackBreadcrumNavigationRequested.cs deleted file mode 100644 index 1b485fae..00000000 --- a/Wino.Core/Messages/Navigation/BackBreadcrumNavigationRequested.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Wino.Core.Messages.Navigation -{ - /// - /// When back navigation is requested for breadcrumb pages. - /// - public record BackBreadcrumNavigationRequested { } -} diff --git a/Wino.Core/Messages/Navigation/BreadcrumbNavigationRequested.cs b/Wino.Core/Messages/Navigation/BreadcrumbNavigationRequested.cs deleted file mode 100644 index e89ac11b..00000000 --- a/Wino.Core/Messages/Navigation/BreadcrumbNavigationRequested.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Wino.Core.Domain.Enums; - -namespace Wino.Core.Messages.Navigation -{ - /// - /// When Breadcrumb control navigation requested. - /// - /// Title to display for the page. - /// Enum equilavent of the page to navigate. - /// Additional parameters to the page. - public record BreadcrumbNavigationRequested(string PageTitle, WinoPage PageType, object Parameter = null); -} diff --git a/Wino.Core/Messages/Navigation/NavigateSettingsRequested.cs b/Wino.Core/Messages/Navigation/NavigateSettingsRequested.cs deleted file mode 100644 index 1e4a9477..00000000 --- a/Wino.Core/Messages/Navigation/NavigateSettingsRequested.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Wino.Core.Messages.Navigation -{ - /// - /// Navigates to settings page. - /// - public record NavigateSettingsRequested; -} \ No newline at end of file diff --git a/Wino.Core/Messages/Shell/ApplicationThemeChanged.cs b/Wino.Core/Messages/Shell/ApplicationThemeChanged.cs deleted file mode 100644 index a688f33b..00000000 --- a/Wino.Core/Messages/Shell/ApplicationThemeChanged.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Wino.Core.Messages.Shell -{ - /// - /// When the application theme changed. - /// - /// - public record ApplicationThemeChanged(bool IsUnderlyingThemeDark); -} diff --git a/Wino.Core/Messages/Shell/CreateNewMailWithMultipleAccountsRequested.cs b/Wino.Core/Messages/Shell/CreateNewMailWithMultipleAccountsRequested.cs deleted file mode 100644 index ac938562..00000000 --- a/Wino.Core/Messages/Shell/CreateNewMailWithMultipleAccountsRequested.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections.Generic; -using Wino.Core.Domain.Entities; - -namespace Wino.Core.Messages.Shell -{ - /// - /// 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. - /// - public record CreateNewMailWithMultipleAccountsRequested(IEnumerable AllAccounts); -} diff --git a/Wino.Core/Messages/Shell/InfoBarMessageRequested.cs b/Wino.Core/Messages/Shell/InfoBarMessageRequested.cs deleted file mode 100644 index a67daea7..00000000 --- a/Wino.Core/Messages/Shell/InfoBarMessageRequested.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using Wino.Core.Domain.Enums; - -namespace Wino.Core.Messages.Shell -{ - /// - /// For displaying right sliding notification message in shell. - /// - /// Severity of notification. - /// Title of the message. - /// Message content. - public record InfoBarMessageRequested(InfoBarMessageType Severity, - string Title, - string Message, - string ActionButtonTitle = "", - Action Action = null); -} diff --git a/Wino.Core/Messages/Shell/LanguageChanged.cs b/Wino.Core/Messages/Shell/LanguageChanged.cs deleted file mode 100644 index 3c98746f..00000000 --- a/Wino.Core/Messages/Shell/LanguageChanged.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Wino.Core.Messages.Shell -{ - /// - /// When application language is updated. - /// - public record LanguageChanged; -} diff --git a/Wino.Core/Messages/Shell/MailtoProtocolMessageRequested.cs b/Wino.Core/Messages/Shell/MailtoProtocolMessageRequested.cs deleted file mode 100644 index 9ed37bc4..00000000 --- a/Wino.Core/Messages/Shell/MailtoProtocolMessageRequested.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace Wino.Core.Messages.Shell -{ - public class MailtoProtocolMessageRequested { } -} diff --git a/Wino.Core/Messages/Shell/NavigationPaneModeChanged.cs b/Wino.Core/Messages/Shell/NavigationPaneModeChanged.cs deleted file mode 100644 index 994d33ed..00000000 --- a/Wino.Core/Messages/Shell/NavigationPaneModeChanged.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Wino.Core.Domain.Enums; - -namespace Wino.Core.Messages.Shell -{ - /// - /// When navigation pane mode is changed. - /// - /// New navigation mode. - public record NavigationPaneModeChanged(MenuPaneMode NewMode); -} diff --git a/Wino.Core/Messages/Shell/ShellStateUpdated.cs b/Wino.Core/Messages/Shell/ShellStateUpdated.cs deleted file mode 100644 index 4d07af9e..00000000 --- a/Wino.Core/Messages/Shell/ShellStateUpdated.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Wino.Core.Messages.Shell -{ - /// - /// When reading mail state or reader pane narrowed state is changed. - /// - public record ShellStateUpdated; -} diff --git a/Wino.Core/Messages/Synchronization/AccountSynchronizationCompleted.cs b/Wino.Core/Messages/Synchronization/AccountSynchronizationCompleted.cs deleted file mode 100644 index c45033fe..00000000 --- a/Wino.Core/Messages/Synchronization/AccountSynchronizationCompleted.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System; -using Wino.Core.Domain.Enums; - -namespace Wino.Core.Messages.Synchronization -{ - public record AccountSynchronizationCompleted(Guid AccountId, SynchronizationCompletedState Result, Guid? SynchronizationTrackingId); -} diff --git a/Wino.Core/Messages/Synchronization/AccountSynchronizerStateChanged.cs b/Wino.Core/Messages/Synchronization/AccountSynchronizerStateChanged.cs deleted file mode 100644 index 4662fcb7..00000000 --- a/Wino.Core/Messages/Synchronization/AccountSynchronizerStateChanged.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; - -namespace Wino.Core.Messages.Synchronization -{ - /// - /// Emitted when synchronizer state is updated. - /// - /// Account Synchronizer - /// New state. - public record AccountSynchronizerStateChanged(IBaseSynchronizer Synchronizer, AccountSynchronizerState NewState); -} diff --git a/Wino.Core/Messages/Synchronization/NewSynchronizationRequested.cs b/Wino.Core/Messages/Synchronization/NewSynchronizationRequested.cs deleted file mode 100644 index 593d6c89..00000000 --- a/Wino.Core/Messages/Synchronization/NewSynchronizationRequested.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Wino.Core.Domain.Models.Synchronization; - -namespace Wino.Core.Messages.Synchronization -{ - /// - /// Triggers a new synchronization if possible. - /// - /// Options for synchronization. - public record NewSynchronizationRequested(SynchronizationOptions Options); -} diff --git a/Wino.Core/Services/AuthenticationProvider.cs b/Wino.Core/Services/AuthenticationProvider.cs deleted file mode 100644 index 20c78bcc..00000000 --- a/Wino.Core/Services/AuthenticationProvider.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using Wino.Core.Authenticators; -using Wino.Core.Domain; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using IAuthenticationProvider = Wino.Core.Domain.Interfaces.IAuthenticationProvider; - -namespace Wino.Core.Services -{ - public class AuthenticationProvider : IAuthenticationProvider - { - private readonly INativeAppService _nativeAppService; - private readonly ITokenService _tokenService; - - public AuthenticationProvider(INativeAppService nativeAppService, ITokenService tokenService) - { - _nativeAppService = nativeAppService; - _tokenService = tokenService; - } - - public IAuthenticator GetAuthenticator(MailProviderType providerType) - { - return providerType switch - { - MailProviderType.Outlook => new OutlookAuthenticator(_tokenService, _nativeAppService), - MailProviderType.Office365 => new Office365Authenticator(_tokenService, _nativeAppService), - MailProviderType.Gmail => new GmailAuthenticator(_tokenService, _nativeAppService), - MailProviderType.Yahoo => new YahooAuthenticator(_tokenService), - MailProviderType.IMAP4 => new CustomAuthenticator(_tokenService), - _ => throw new ArgumentException(Translator.Exception_UnsupportedProvider), - }; - } - } -} diff --git a/Wino.Mail.ViewModels/AboutPageViewModel.cs b/Wino.Mail.ViewModels/AboutPageViewModel.cs index a8403a1a..ae134a27 100644 --- a/Wino.Mail.ViewModels/AboutPageViewModel.cs +++ b/Wino.Mail.ViewModels/AboutPageViewModel.cs @@ -2,9 +2,10 @@ using System.IO; using System.Threading.Tasks; using CommunityToolkit.Mvvm.Input; -using Wino.Core.Domain; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Services; +using Wino.Domain; +using Wino.Domain; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; namespace Wino.Mail.ViewModels { @@ -71,9 +72,9 @@ namespace Wino.Mail.ViewModels } private Task ShareProtocolLogAsync() - => SaveLogInternalAsync(ImapTestService.ProtocolLogFileName); + => SaveLogInternalAsync(Constants.ProtocolLogFileName); private Task ShareWinoLogAsync() - => SaveLogInternalAsync(LogInitializer.WinoLogFileName); + => SaveLogInternalAsync(Constants.WinoLogFileName); private async Task SaveLogInternalAsync(string sourceFileName) { @@ -83,7 +84,7 @@ namespace Wino.Mail.ViewModels if (!File.Exists(logFile)) { - DialogService.InfoBarMessage(Translator.Info_LogsNotFoundTitle, Translator.Info_LogsNotFoundMessage, Core.Domain.Enums.InfoBarMessageType.Warning); + DialogService.InfoBarMessage(Translator.Info_LogsNotFoundTitle, Translator.Info_LogsNotFoundMessage, InfoBarMessageType.Warning); return; } @@ -95,7 +96,7 @@ namespace Wino.Mail.ViewModels var copiedFileName = Path.GetFileName(copiedFilePath); - DialogService.InfoBarMessage(Translator.Info_LogsSavedTitle, string.Format(Translator.Info_LogsSavedMessage, copiedFileName), Core.Domain.Enums.InfoBarMessageType.Success); + DialogService.InfoBarMessage(Translator.Info_LogsSavedTitle, string.Format(Translator.Info_LogsSavedMessage, copiedFileName), InfoBarMessageType.Success); } private async Task Navigate(object url) diff --git a/Wino.Mail.ViewModels/AccountDetailsPageViewModel.cs b/Wino.Mail.ViewModels/AccountDetailsPageViewModel.cs index 3dde449e..badb2add 100644 --- a/Wino.Mail.ViewModels/AccountDetailsPageViewModel.cs +++ b/Wino.Mail.ViewModels/AccountDetailsPageViewModel.cs @@ -5,12 +5,12 @@ using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.Navigation; +using Wino.Domain; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Folders; +using Wino.Domain.Models.Navigation; using Wino.Messaging.Client.Navigation; using Wino.Messaging.Server; diff --git a/Wino.Mail.ViewModels/AccountManagementViewModel.cs b/Wino.Mail.ViewModels/AccountManagementViewModel.cs index 8b5278af..9d0de64f 100644 --- a/Wino.Mail.ViewModels/AccountManagementViewModel.cs +++ b/Wino.Mail.ViewModels/AccountManagementViewModel.cs @@ -8,13 +8,15 @@ using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; using Microsoft.AppCenter.Crashes; using Serilog; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Exceptions; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Navigation; -using Wino.Core.Domain.Models.Store; +using Wino.Domain; +using Wino.Domain.Exceptions; +using Wino.Domain; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Exceptions; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Navigation; +using Wino.Domain.Models.Store; using Wino.Mail.ViewModels.Data; using Wino.Messaging.Client.Authorization; using Wino.Messaging.Client.Navigation; diff --git a/Wino.Mail.ViewModels/AppShellViewModel.cs b/Wino.Mail.ViewModels/AppShellViewModel.cs index 77d2789e..3d7c30d8 100644 --- a/Wino.Mail.ViewModels/AppShellViewModel.cs +++ b/Wino.Mail.ViewModels/AppShellViewModel.cs @@ -7,16 +7,15 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; using Serilog; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Navigation; -using Wino.Core.Domain.Models.Synchronization; -using Wino.Core.MenuItems; -using Wino.Core.Services; +using Wino.Domain; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Folders; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Navigation; +using Wino.Domain.Models.Synchronization; +using Wino.Mail.ViewModels.Data.MenuItems; using Wino.Messaging.Client.Accounts; using Wino.Messaging.Client.Mails; using Wino.Messaging.Client.Navigation; @@ -432,7 +431,7 @@ namespace Wino.Mail.ViewModels } var package = new MailOperationPreperationRequest(MailOperation.Move, group, false, handlingAccountFolder); - await _winoRequestDelegator.ExecuteAsync(package); + await _winoRequestDelegator.QueueAsync(package); } } else if (targetFolderMenuItem is IFolderMenuItem singleFolderMenuItem) @@ -442,7 +441,7 @@ namespace Wino.Mail.ViewModels var package = new MailOperationPreperationRequest(MailOperation.Move, items, false, targetFolderMenuItem.HandlingFolders.First()); - await _winoRequestDelegator.ExecuteAsync(package); + await _winoRequestDelegator.QueueAsync(package); } } @@ -465,7 +464,7 @@ namespace Wino.Mail.ViewModels { var folderPrepRequest = new FolderOperationPreperationRequest(operation, realFolder); - await _winoRequestDelegator.ExecuteAsync(folderPrepRequest); + await _winoRequestDelegator.QueueAsync(folderPrepRequest); } } @@ -575,7 +574,7 @@ namespace Wino.Mail.ViewModels }); // Load account folder structure and replace the visible folders. - var folders = await _folderService.GetAccountFoldersForDisplayAsync(clickedBaseAccountMenuItem); + var folders = await GetAccountFoldersForDisplayAsync(clickedBaseAccountMenuItem); await MenuItems.ReplaceFoldersAsync(folders); await UpdateUnreadItemCountAsync(); @@ -592,6 +591,154 @@ namespace Wino.Mail.ViewModels } } + #region Folder Menu Item Preperations + + public Task> GetAccountFoldersForDisplayAsync(IAccountMenuItem accountMenuItem) + { + if (accountMenuItem is IMergedAccountMenuItem mergedAccountFolderMenuItem) + { + return GetMergedAccountFolderMenuItemsAsync(mergedAccountFolderMenuItem); + } + else + { + return GetSingleAccountFolderMenuItemsAsync(accountMenuItem); + } + } + + private async Task GetPreparedFolderMenuItemRecursiveAsync(MailAccount account, MailItemFolder parentFolder, IMenuItem parentMenuItem) + { + // Localize category folder name. + if (parentFolder.SpecialFolderType == SpecialFolderType.Category) parentFolder.FolderName = Translator.CategoriesFolderNameOverride; + + var preparedFolder = new FolderMenuItem(parentFolder, account, parentMenuItem); + + var childFolders = await _folderService.GetChildFoldersAsync(account.Id, parentFolder.RemoteFolderId).ConfigureAwait(false); + + if (childFolders.Any()) + { + foreach (var subChildFolder in childFolders) + { + var preparedChild = await GetPreparedFolderMenuItemRecursiveAsync(account, subChildFolder, preparedFolder); + + if (preparedChild == null) continue; + + preparedFolder.SubMenuItems.Add(preparedChild); + } + } + + return preparedFolder; + } + + private async Task> GetSingleAccountFolderMenuItemsAsync(IAccountMenuItem accountMenuItem) + { + var accountId = accountMenuItem.EntityId.Value; + var preparedFolderMenuItems = new List(); + + // Get all folders for the account. Excluding hidden folders. + var folders = await _folderService.GetVisibleFoldersAsync(accountId).ConfigureAwait(false); + + if (!folders.Any()) return new List(); + + var mailAccount = accountMenuItem.HoldingAccounts.First(); + + var listingFolders = folders.OrderBy(a => a.SpecialFolderType); + + var moreFolder = MailItemFolder.CreateMoreFolder(); + var categoryFolder = MailItemFolder.CreateCategoriesFolder(); + + var moreFolderMenuItem = new FolderMenuItem(moreFolder, mailAccount, accountMenuItem); + var categoryFolderMenuItem = new FolderMenuItem(categoryFolder, mailAccount, accountMenuItem); + + foreach (var item in listingFolders) + { + // Category type folders should be skipped. They will be categorized under virtual category folder. + if (Constants.SubCategoryFolderLabelIds.Contains(item.RemoteFolderId)) continue; + + bool skipEmptyParentRemoteFolders = mailAccount.ProviderType == MailProviderType.Gmail; + + if (skipEmptyParentRemoteFolders && !string.IsNullOrEmpty(item.ParentRemoteFolderId)) continue; + + // Sticky items belong to account menu item directly. Rest goes to More folder. + IMenuItem parentFolderMenuItem = item.IsSticky ? accountMenuItem : (Constants.SubCategoryFolderLabelIds.Contains(item.FolderName.ToUpper()) ? categoryFolderMenuItem : moreFolderMenuItem); + + var preparedItem = await GetPreparedFolderMenuItemRecursiveAsync(mailAccount, item, parentFolderMenuItem).ConfigureAwait(false); + + // Don't add menu items that are prepared for More folder. They've been included in More virtual folder already. + // We'll add More folder later on at the end of the list. + + if (preparedItem == null) continue; + + if (item.IsSticky) + { + preparedFolderMenuItems.Add(preparedItem); + } + else if (parentFolderMenuItem is FolderMenuItem baseParentFolderMenuItem) + { + baseParentFolderMenuItem.SubMenuItems.Add(preparedItem); + } + } + + // Only add category folder if it's Gmail. + if (mailAccount.ProviderType == MailProviderType.Gmail) preparedFolderMenuItems.Add(categoryFolderMenuItem); + + // Only add More folder if there are any items in it. + if (moreFolderMenuItem.SubMenuItems.Any()) preparedFolderMenuItems.Add(moreFolderMenuItem); + + return preparedFolderMenuItems; + } + + private async Task> GetMergedAccountFolderMenuItemsAsync(IMergedAccountMenuItem mergedAccountFolderMenuItem) + { + var holdingAccounts = mergedAccountFolderMenuItem.HoldingAccounts; + + if (holdingAccounts == null || !holdingAccounts.Any()) return []; + + var preparedFolderMenuItems = new List(); + + // First gather all account folders. + // Prepare single menu items for both of them. + + var allAccountFolders = new List>(); + + foreach (var account in holdingAccounts) + { + var accountFolders = await _folderService.GetVisibleFoldersAsync(account.Id).ConfigureAwait(false); + + allAccountFolders.Add(accountFolders); + } + + var commonFolders = FindCommonFolders(allAccountFolders); + + // Prepare menu items for common folders. + foreach (var commonFolderType in commonFolders) + { + var folderItems = allAccountFolders.SelectMany(a => a.Where(b => b.SpecialFolderType == commonFolderType)).Cast().ToList(); + var menuItem = new MergedAccountFolderMenuItem(folderItems, null, mergedAccountFolderMenuItem.Parameter); + + preparedFolderMenuItems.Add(menuItem); + } + + return preparedFolderMenuItems; + } + + private HashSet FindCommonFolders(List> lists) + { + var allSpecialTypesExceptOther = Enum.GetValues(typeof(SpecialFolderType)).Cast().Where(a => a != SpecialFolderType.Other).ToList(); + + // Start with all special folder types from the first list + var commonSpecialFolderTypes = new HashSet(allSpecialTypesExceptOther); + + // Intersect with special folder types from all lists + foreach (var list in lists) + { + commonSpecialFolderTypes.IntersectWith(list.Select(f => f.SpecialFolderType)); + } + + return commonSpecialFolderTypes; + } + + #endregion + private async Task UpdateUnreadItemCountAsync() { // Get visible account menu items, ordered by merged accounts at the last. @@ -763,7 +910,7 @@ namespace Wino.Mail.ViewModels var createdDraftMailMessage = await _mailService.CreateDraftAsync(account, createdMimeMessage).ConfigureAwait(false); var draftPreperationRequest = new DraftPreperationRequest(account, createdDraftMailMessage, createdMimeMessage); - await _winoRequestDelegator.ExecuteAsync(draftPreperationRequest); + await _winoRequestDelegator.QueueAsync(draftPreperationRequest); } public async void Receive(NewSynchronizationRequested message) diff --git a/Wino.Mail.ViewModels/BaseViewModel.cs b/Wino.Mail.ViewModels/BaseViewModel.cs index 4f60c448..8ad77e35 100644 --- a/Wino.Mail.ViewModels/BaseViewModel.cs +++ b/Wino.Mail.ViewModels/BaseViewModel.cs @@ -2,10 +2,10 @@ using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.Navigation; +using Wino.Domain.Entities; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Folders; +using Wino.Domain.Models.Navigation; using Wino.Messaging.Server; namespace Wino.Mail.ViewModels diff --git a/Wino.Mail.ViewModels/Collections/WinoMailCollection.cs b/Wino.Mail.ViewModels/Collections/WinoMailCollection.cs index ba1bcb84..65e0d23e 100644 --- a/Wino.Mail.ViewModels/Collections/WinoMailCollection.cs +++ b/Wino.Mail.ViewModels/Collections/WinoMailCollection.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using CommunityToolkit.Mvvm.Collections; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Comparers; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Comparers; +using Wino.Domain.Models.MailItem; using Wino.Mail.ViewModels.Data; namespace Wino.Mail.ViewModels.Collections diff --git a/Wino.Mail.ViewModels/ComposePageViewModel.cs b/Wino.Mail.ViewModels/ComposePageViewModel.cs index 71398fec..b3ec0125 100644 --- a/Wino.Mail.ViewModels/ComposePageViewModel.cs +++ b/Wino.Mail.ViewModels/ComposePageViewModel.cs @@ -9,16 +9,16 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; using MimeKit; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Exceptions; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Navigation; -using Wino.Core.Domain.Models.Reader; -using Wino.Core.Extensions; -using Wino.Core.Services; +using Wino.Domain; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Exceptions; +using Wino.Domain.Extensions; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Navigation; +using Wino.Domain.Models.Reader; using Wino.Mail.ViewModels.Data; using Wino.Messaging.Client.Mails; @@ -113,6 +113,7 @@ namespace Wino.Mail.ViewModels private readonly IAccountService _accountService; private readonly IWinoRequestDelegator _worker; public readonly IContactService ContactService; + private readonly IHtmlPreviewer _htmlPreviewer; public ComposePageViewModel(IDialogService dialogService, IMailService mailService, @@ -123,12 +124,13 @@ namespace Wino.Mail.ViewModels IFolderService folderService, IAccountService accountService, IWinoRequestDelegator worker, - IContactService contactService) : base(dialogService) + IContactService contactService, + IHtmlPreviewer htmlPreviewer) : base(dialogService) { NativeAppService = nativeAppService; _folderService = folderService; ContactService = contactService; - + _htmlPreviewer = htmlPreviewer; _mailService = mailService; _launchProtocolService = launchProtocolService; _mimeFileService = mimeFileService; @@ -170,7 +172,7 @@ namespace Wino.Mail.ViewModels var sentFolder = await _folderService.GetSpecialFolderByAccountIdAsync(assignedAccount.Id, SpecialFolderType.Sent); var draftSendPreparationRequest = new SendDraftPreparationRequest(CurrentMailDraftItem.MailCopy, CurrentMimeMessage, CurrentMailDraftItem.AssignedFolder, sentFolder, CurrentMailDraftItem.AssignedAccount.Preferences); - await _worker.ExecuteAsync(draftSendPreparationRequest); + await _worker.QueueAsync(draftSendPreparationRequest); } private async Task UpdateMimeChangesAsync() @@ -238,7 +240,7 @@ namespace Wino.Mail.ViewModels } if (!string.IsNullOrEmpty(bodyBuilder.HtmlBody)) - bodyBuilder.TextBody = HtmlAgilityPackExtensions.GetPreviewText(bodyBuilder.HtmlBody); + bodyBuilder.TextBody = _htmlPreviewer.GetHtmlPreview(bodyBuilder.HtmlBody); if (bodyBuilder.HtmlBody != null && bodyBuilder.TextBody != null) CurrentMimeMessage.Body = bodyBuilder.ToMessageBody(); @@ -269,7 +271,7 @@ namespace Wino.Mail.ViewModels else { var deletePackage = new MailOperationPreperationRequest(MailOperation.HardDelete, CurrentMailDraftItem.MailCopy, ignoreHardDeleteProtection: true); - await _worker.ExecuteAsync(deletePackage).ConfigureAwait(false); + await _worker.QueueAsync(deletePackage).ConfigureAwait(false); } } } diff --git a/Wino.Mail.ViewModels/Data/AccountProviderDetailViewModel.cs b/Wino.Mail.ViewModels/Data/AccountProviderDetailViewModel.cs index 8cdacde7..6df6a5e8 100644 --- a/Wino.Mail.ViewModels/Data/AccountProviderDetailViewModel.cs +++ b/Wino.Mail.ViewModels/Data/AccountProviderDetailViewModel.cs @@ -1,7 +1,7 @@ using System; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Entities; +using Wino.Domain.Interfaces; namespace Wino.Mail.ViewModels.Data { diff --git a/Wino.Mail.ViewModels/Data/BreadcrumbNavigationItemViewModel.cs b/Wino.Mail.ViewModels/Data/BreadcrumbNavigationItemViewModel.cs index 616e2dea..c90b81aa 100644 --- a/Wino.Mail.ViewModels/Data/BreadcrumbNavigationItemViewModel.cs +++ b/Wino.Mail.ViewModels/Data/BreadcrumbNavigationItemViewModel.cs @@ -1,5 +1,5 @@ using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Messages.Navigation; +using Wino.Messaging.Client.Navigation; namespace Wino.Mail.ViewModels.Data { diff --git a/Wino.Mail.ViewModels/Data/FolderPivotViewModel.cs b/Wino.Mail.ViewModels/Data/FolderPivotViewModel.cs index 69620759..ea7058c0 100644 --- a/Wino.Mail.ViewModels/Data/FolderPivotViewModel.cs +++ b/Wino.Mail.ViewModels/Data/FolderPivotViewModel.cs @@ -1,6 +1,6 @@ using System.Diagnostics; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain; +using Wino.Domain; namespace Wino.Mail.ViewModels.Data { diff --git a/Wino.Mail.ViewModels/Data/MailAttachmentViewModel.cs b/Wino.Mail.ViewModels/Data/MailAttachmentViewModel.cs index 90387ce4..74993c6f 100644 --- a/Wino.Mail.ViewModels/Data/MailAttachmentViewModel.cs +++ b/Wino.Mail.ViewModels/Data/MailAttachmentViewModel.cs @@ -1,8 +1,8 @@ using System.IO; using CommunityToolkit.Mvvm.ComponentModel; using MimeKit; -using Wino.Core.Domain.Enums; -using Wino.Core.Extensions; +using Wino.Domain.Enums; +using Wino.Domain.Extensions; namespace Wino.Mail.ViewModels.Data { diff --git a/Wino.Mail.ViewModels/Data/MailItemViewModel.cs b/Wino.Mail.ViewModels/Data/MailItemViewModel.cs index aa77ead0..b33615a3 100644 --- a/Wino.Mail.ViewModels/Data/MailItemViewModel.cs +++ b/Wino.Mail.ViewModels/Data/MailItemViewModel.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Entities; +using Wino.Domain.Models.MailItem; namespace Wino.Mail.ViewModels.Data { diff --git a/Wino.Core/MenuItems/AccountMenuItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/AccountMenuItem.cs similarity index 94% rename from Wino.Core/MenuItems/AccountMenuItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/AccountMenuItem.cs index 045038f4..88e26b54 100644 --- a/Wino.Core/MenuItems/AccountMenuItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/AccountMenuItem.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Linq; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Folders; -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public partial class AccountMenuItem : MenuItemBase>, IAccountMenuItem { diff --git a/Wino.Core/MenuItems/FixAccountIssuesMenuItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/FixAccountIssuesMenuItem.cs similarity index 70% rename from Wino.Core/MenuItems/FixAccountIssuesMenuItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/FixAccountIssuesMenuItem.cs index ce953cb6..c364f8dd 100644 --- a/Wino.Core/MenuItems/FixAccountIssuesMenuItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/FixAccountIssuesMenuItem.cs @@ -1,8 +1,8 @@ -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain.Entities; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Folders; -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public class FixAccountIssuesMenuItem : MenuItemBase { diff --git a/Wino.Core/MenuItems/FolderMenuItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/FolderMenuItem.cs similarity index 93% rename from Wino.Core/MenuItems/FolderMenuItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/FolderMenuItem.cs index 90b3ffbe..fd6b4b10 100644 --- a/Wino.Core/MenuItems/FolderMenuItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/FolderMenuItem.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; using System.Linq; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Folders; -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public partial class FolderMenuItem : MenuItemBase, IFolderMenuItem { diff --git a/Wino.Core/MenuItems/ManageAccountsMenuItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/ManageAccountsMenuItem.cs similarity index 56% rename from Wino.Core/MenuItems/ManageAccountsMenuItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/ManageAccountsMenuItem.cs index 2d69f5b0..b1a85ad3 100644 --- a/Wino.Core/MenuItems/ManageAccountsMenuItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/ManageAccountsMenuItem.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public class ManageAccountsMenuItem : MenuItemBase { } } diff --git a/Wino.Core/MenuItems/MenuItemBase.cs b/Wino.Mail.ViewModels/Data/MenuItems/MenuItemBase.cs similarity index 95% rename from Wino.Core/MenuItems/MenuItemBase.cs rename to Wino.Mail.ViewModels/Data/MenuItems/MenuItemBase.cs index fef4fffd..4b90cb91 100644 --- a/Wino.Core/MenuItems/MenuItemBase.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/MenuItemBase.cs @@ -1,9 +1,9 @@ using System; using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public partial class MenuItemBase : ObservableObject, IMenuItem { diff --git a/Wino.Core/MenuItems/MenuItemCollection.cs b/Wino.Mail.ViewModels/Data/MenuItems/MenuItemCollection.cs similarity index 98% rename from Wino.Core/MenuItems/MenuItemCollection.cs rename to Wino.Mail.ViewModels/Data/MenuItems/MenuItemCollection.cs index f1357d35..e59bf2df 100644 --- a/Wino.Core/MenuItems/MenuItemCollection.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/MenuItemCollection.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using MoreLinq.Extensions; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public class MenuItemCollection : ObservableRangeCollection { diff --git a/Wino.Core/MenuItems/MergedAccountFolderMenuItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/MergedAccountFolderMenuItem.cs similarity index 95% rename from Wino.Core/MenuItems/MergedAccountFolderMenuItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/MergedAccountFolderMenuItem.cs index 52e18cb9..ae981921 100644 --- a/Wino.Core/MenuItems/MergedAccountFolderMenuItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/MergedAccountFolderMenuItem.cs @@ -2,13 +2,13 @@ using System.Linq; using CommunityToolkit.Diagnostics; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Folders; -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { /// /// Menu item that holds a list of folders under the merged account menu item. diff --git a/Wino.Core/MenuItems/MergedAccountMenuItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/MergedAccountMenuItem.cs similarity index 91% rename from Wino.Core/MenuItems/MergedAccountMenuItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/MergedAccountMenuItem.cs index 842824ab..ba374ea6 100644 --- a/Wino.Core/MenuItems/MergedAccountMenuItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/MergedAccountMenuItem.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Entities; +using Wino.Domain.Interfaces; -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public partial class MergedAccountMenuItem : MenuItemBase, IMergedAccountMenuItem { diff --git a/Wino.Core/MenuItems/MergedAccountMoreFolderMenuItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/MergedAccountMoreFolderMenuItem.cs similarity index 79% rename from Wino.Core/MenuItems/MergedAccountMoreFolderMenuItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/MergedAccountMoreFolderMenuItem.cs index f0a8b0cc..dea154bc 100644 --- a/Wino.Core/MenuItems/MergedAccountMoreFolderMenuItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/MergedAccountMoreFolderMenuItem.cs @@ -1,7 +1,7 @@ using System; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public class MergedAccountMoreFolderMenuItem : MenuItemBase { diff --git a/Wino.Core/MenuItems/NewMailMenuItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/NewMailMenuItem.cs similarity index 53% rename from Wino.Core/MenuItems/NewMailMenuItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/NewMailMenuItem.cs index dc543c2d..ef8fb87d 100644 --- a/Wino.Core/MenuItems/NewMailMenuItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/NewMailMenuItem.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public class NewMailMenuItem : MenuItemBase { } } diff --git a/Wino.Core/MenuItems/ObservableRangeCollection.cs b/Wino.Mail.ViewModels/Data/MenuItems/ObservableRangeCollection.cs similarity index 96% rename from Wino.Core/MenuItems/ObservableRangeCollection.cs rename to Wino.Mail.ViewModels/Data/MenuItems/ObservableRangeCollection.cs index 17025fd0..adb566a8 100644 --- a/Wino.Core/MenuItems/ObservableRangeCollection.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/ObservableRangeCollection.cs @@ -4,7 +4,7 @@ using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { /// /// Represents a dynamic data collection that provides notifications when items get added, removed, or when the whole list is refreshed. @@ -25,7 +25,7 @@ namespace Wino.Core.MenuItems /// Initializes a new instance of the System.Collections.ObjectModel.ObservableCollection(Of T) class that contains elements copied from the specified collection. /// /// collection: The collection from which the elements are copied. - /// The collection parameter cannot be null. + /// The collection parameter cannot be null. public ObservableRangeCollection(IEnumerable collection) : base(collection) { @@ -150,7 +150,7 @@ namespace Wino.Core.MenuItems return itemAdded; } - private void RaiseChangeNotificationEvents(NotifyCollectionChangedAction action, List? changedItems = null, int startingIndex = -1) + private void RaiseChangeNotificationEvents(NotifyCollectionChangedAction action, List changedItems = null, int startingIndex = -1) { OnPropertyChanged(new PropertyChangedEventArgs(nameof(Count))); OnPropertyChanged(new PropertyChangedEventArgs("Item[]")); diff --git a/Wino.Core/MenuItems/RateMenuItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/RateMenuItem.cs similarity index 51% rename from Wino.Core/MenuItems/RateMenuItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/RateMenuItem.cs index cb339a1a..28737fa0 100644 --- a/Wino.Core/MenuItems/RateMenuItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/RateMenuItem.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public class RateMenuItem : MenuItemBase { } } diff --git a/Wino.Core/MenuItems/SeperatorItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/SeperatorItem.cs similarity index 52% rename from Wino.Core/MenuItems/SeperatorItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/SeperatorItem.cs index 974f36cc..2d5173ca 100644 --- a/Wino.Core/MenuItems/SeperatorItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/SeperatorItem.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public class SeperatorItem : MenuItemBase { } } diff --git a/Wino.Core/MenuItems/SettingsItem.cs b/Wino.Mail.ViewModels/Data/MenuItems/SettingsItem.cs similarity index 51% rename from Wino.Core/MenuItems/SettingsItem.cs rename to Wino.Mail.ViewModels/Data/MenuItems/SettingsItem.cs index 12aafba9..6959a8ba 100644 --- a/Wino.Core/MenuItems/SettingsItem.cs +++ b/Wino.Mail.ViewModels/Data/MenuItems/SettingsItem.cs @@ -1,4 +1,4 @@ -namespace Wino.Core.MenuItems +namespace Wino.Mail.ViewModels.Data.MenuItems { public class SettingsItem : MenuItemBase { } } diff --git a/Wino.Mail.ViewModels/Data/MergedAccountProviderDetailViewModel.cs b/Wino.Mail.ViewModels/Data/MergedAccountProviderDetailViewModel.cs index 07f3476b..8b9a13b5 100644 --- a/Wino.Mail.ViewModels/Data/MergedAccountProviderDetailViewModel.cs +++ b/Wino.Mail.ViewModels/Data/MergedAccountProviderDetailViewModel.cs @@ -2,8 +2,8 @@ using System.Collections.Generic; using System.Linq; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Entities; +using Wino.Domain.Interfaces; namespace Wino.Mail.ViewModels.Data { diff --git a/Wino.Mail.ViewModels/Data/ThreadMailItemViewModel.cs b/Wino.Mail.ViewModels/Data/ThreadMailItemViewModel.cs index 3594b40d..f5108811 100644 --- a/Wino.Mail.ViewModels/Data/ThreadMailItemViewModel.cs +++ b/Wino.Mail.ViewModels/Data/ThreadMailItemViewModel.cs @@ -4,8 +4,8 @@ using System.Collections.ObjectModel; using System.Diagnostics; using System.Linq; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Models.MailItem; +using Wino.Domain.Entities; +using Wino.Domain.Models.MailItem; namespace Wino.Mail.ViewModels.Data { diff --git a/Wino.Mail.ViewModels/IdlePageViewModel.cs b/Wino.Mail.ViewModels/IdlePageViewModel.cs index 4bc6dcb8..ebecbd1f 100644 --- a/Wino.Mail.ViewModels/IdlePageViewModel.cs +++ b/Wino.Mail.ViewModels/IdlePageViewModel.cs @@ -1,4 +1,4 @@ -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; namespace Wino.Mail.ViewModels { diff --git a/Wino.Mail.ViewModels/LanguageTimePageViewModel.cs b/Wino.Mail.ViewModels/LanguageTimePageViewModel.cs index dc87d24d..28aa8d28 100644 --- a/Wino.Mail.ViewModels/LanguageTimePageViewModel.cs +++ b/Wino.Mail.ViewModels/LanguageTimePageViewModel.cs @@ -2,9 +2,9 @@ using System.ComponentModel; using System.Linq; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Navigation; -using Wino.Core.Domain.Models.Translations; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Navigation; +using Wino.Domain.Models.Translations; namespace Wino.Mail.ViewModels { diff --git a/Wino.Mail.ViewModels/MailListPageViewModel.cs b/Wino.Mail.ViewModels/MailListPageViewModel.cs index ce9539ee..6b188b83 100644 --- a/Wino.Mail.ViewModels/MailListPageViewModel.cs +++ b/Wino.Mail.ViewModels/MailListPageViewModel.cs @@ -12,23 +12,24 @@ using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; using Microsoft.AppCenter.Crashes; using MoreLinq; -using Nito.AsyncEx; using Serilog; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Menus; -using Wino.Core.Domain.Models.Reader; -using Wino.Core.Domain.Models.Synchronization; -using Wino.Core.Messages.Mails; -using Wino.Core.Messages.Shell; -using Wino.Core.Messages.Synchronization; +using Wino.Domain; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Synchronization; +using Wino.Domain; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Folders; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Menus; +using Wino.Domain.Models.Reader; using Wino.Mail.ViewModels.Collections; using Wino.Mail.ViewModels.Data; using Wino.Mail.ViewModels.Messages; +using Wino.Messaging.Client.Mails; +using Wino.Messaging.Client.Shell; +using Wino.Messaging.Client.Synchronization; namespace Wino.Mail.ViewModels { @@ -546,7 +547,7 @@ namespace Wino.Mail.ViewModels #endregion - public Task ExecuteMailOperationAsync(MailOperationPreperationRequest package) => _winoRequestDelegator.ExecuteAsync(package); + public Task ExecuteMailOperationAsync(MailOperationPreperationRequest package) => _winoRequestDelegator.QueueAsync(package); public IEnumerable GetTargetMailItemViewModels(IMailItem clickedItem) { diff --git a/Wino.Mail.ViewModels/MailRenderingPageViewModel.cs b/Wino.Mail.ViewModels/MailRenderingPageViewModel.cs index 47324b8c..d734b4b4 100644 --- a/Wino.Mail.ViewModels/MailRenderingPageViewModel.cs +++ b/Wino.Mail.ViewModels/MailRenderingPageViewModel.cs @@ -11,19 +11,20 @@ using MailKit; using Microsoft.AppCenter.Crashes; using MimeKit; using Serilog; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Menus; -using Wino.Core.Domain.Models.Navigation; -using Wino.Core.Domain.Models.Reader; -using Wino.Core.Extensions; -using Wino.Core.Messages.Mails; -using Wino.Core.Services; +using Wino.Domain; +using Wino.Domain.Models.MailItem; +using Wino.Domain; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Extensions; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Models.Menus; +using Wino.Domain.Models.Navigation; +using Wino.Domain.Models.Reader; using Wino.Mail.ViewModels.Data; using Wino.Mail.ViewModels.Messages; +using Wino.Messaging.Client.Mails; namespace Wino.Mail.ViewModels { @@ -34,7 +35,7 @@ namespace Wino.Mail.ViewModels private readonly IUnderlyingThemeService _underlyingThemeService; private readonly IMimeFileService _mimeFileService; - private readonly Core.Domain.Interfaces.IMailService _mailService; + private readonly Domain.Interfaces.IMailService _mailService; private readonly IFileService _fileService; private readonly IWinoRequestDelegator _requestDelegator; private readonly IClipboardService _clipboardService; @@ -120,7 +121,7 @@ namespace Wino.Mail.ViewModels INativeAppService nativeAppService, IUnderlyingThemeService underlyingThemeService, IMimeFileService mimeFileService, - Core.Domain.Interfaces.IMailService mailService, + Domain.Interfaces.IMailService mailService, IFileService fileService, IWinoRequestDelegator requestDelegator, IStatePersistanceService statePersistanceService, @@ -281,14 +282,14 @@ namespace Wino.Mail.ViewModels ReferenceMailCopy = initializedMailItemViewModel.MailCopy }; - await _requestDelegator.ExecuteAsync(draftPreperationRequest); + await _requestDelegator.QueueAsync(draftPreperationRequest); } else if (initializedMailItemViewModel != null) { // All other operations require a mail item. var prepRequest = new MailOperationPreperationRequest(operation, initializedMailItemViewModel.MailCopy); - await _requestDelegator.ExecuteAsync(prepRequest); + await _requestDelegator.QueueAsync(prepRequest); } } @@ -360,6 +361,9 @@ namespace Wino.Mail.ViewModels if (!isMimeExists) { + // TODO: Prevent WinUI crash for non-existing mimes. + return; + await HandleSingleItemDownloadAsync(mailItemViewModel); } diff --git a/Wino.Mail.ViewModels/MergedAccountDetailsPageViewModel.cs b/Wino.Mail.ViewModels/MergedAccountDetailsPageViewModel.cs index 596ec907..033d6882 100644 --- a/Wino.Mail.ViewModels/MergedAccountDetailsPageViewModel.cs +++ b/Wino.Mail.ViewModels/MergedAccountDetailsPageViewModel.cs @@ -5,11 +5,11 @@ using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; -using Wino.Core.Domain; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Navigation; -using Wino.Core.Messages.Navigation; +using Wino.Domain; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Navigation; using Wino.Mail.ViewModels.Data; +using Wino.Messaging.Client.Navigation; using Wino.Messaging.Server; namespace Wino.Mail.ViewModels diff --git a/Wino.Mail.ViewModels/MessageListPageViewModel.cs b/Wino.Mail.ViewModels/MessageListPageViewModel.cs index 8ec9dc68..aa56dffd 100644 --- a/Wino.Mail.ViewModels/MessageListPageViewModel.cs +++ b/Wino.Mail.ViewModels/MessageListPageViewModel.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Wino.Core.Domain; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; +using Wino.Domain; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; namespace Wino.Mail.ViewModels { diff --git a/Wino.Mail.ViewModels/Messages/ActiveMailFolderChangedEvent.cs b/Wino.Mail.ViewModels/Messages/ActiveMailFolderChangedEvent.cs index 4cd8cce7..726125a5 100644 --- a/Wino.Mail.ViewModels/Messages/ActiveMailFolderChangedEvent.cs +++ b/Wino.Mail.ViewModels/Messages/ActiveMailFolderChangedEvent.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Navigation; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Navigation; namespace Wino.Mail.ViewModels.Messages { diff --git a/Wino.Mail.ViewModels/Messages/ActiveMailItemChangedEvent.cs b/Wino.Mail.ViewModels/Messages/ActiveMailItemChangedEvent.cs index fb0fc2b9..6e9c213f 100644 --- a/Wino.Mail.ViewModels/Messages/ActiveMailItemChangedEvent.cs +++ b/Wino.Mail.ViewModels/Messages/ActiveMailItemChangedEvent.cs @@ -1,6 +1,4 @@ -using System; -using Wino.Core.MenuItems; -using Wino.Mail.ViewModels.Data; +using Wino.Mail.ViewModels.Data; namespace Wino.Mail.ViewModels.Messages { diff --git a/Wino.Mail.ViewModels/NewAccountManagementPageViewModel.cs b/Wino.Mail.ViewModels/NewAccountManagementPageViewModel.cs index 2cf70adc..c3675860 100644 --- a/Wino.Mail.ViewModels/NewAccountManagementPageViewModel.cs +++ b/Wino.Mail.ViewModels/NewAccountManagementPageViewModel.cs @@ -1,4 +1,4 @@ -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; namespace Wino.Mail.ViewModels { diff --git a/Wino.Mail.ViewModels/PersonalizationPageViewModel.cs b/Wino.Mail.ViewModels/PersonalizationPageViewModel.cs index 1e302f88..7c063025 100644 --- a/Wino.Mail.ViewModels/PersonalizationPageViewModel.cs +++ b/Wino.Mail.ViewModels/PersonalizationPageViewModel.cs @@ -4,10 +4,10 @@ using System.Linq; using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using Wino.Core.Domain; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Personalization; +using Wino.Domain; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Personalization; using Wino.Mail.ViewModels.Data; namespace Wino.Mail.ViewModels diff --git a/Wino.Mail.ViewModels/ReadingPanePageViewModel.cs b/Wino.Mail.ViewModels/ReadingPanePageViewModel.cs index 5acd18f3..39caca84 100644 --- a/Wino.Mail.ViewModels/ReadingPanePageViewModel.cs +++ b/Wino.Mail.ViewModels/ReadingPanePageViewModel.cs @@ -4,9 +4,9 @@ using System.Diagnostics; using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Messaging; using CommunityToolkit.Mvvm.Messaging.Messages; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Reader; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Reader; namespace Wino.Mail.ViewModels { diff --git a/Wino.Mail.ViewModels/SettingOptionsPageViewModel.cs b/Wino.Mail.ViewModels/SettingOptionsPageViewModel.cs index fdd670eb..9ca1cfd8 100644 --- a/Wino.Mail.ViewModels/SettingOptionsPageViewModel.cs +++ b/Wino.Mail.ViewModels/SettingOptionsPageViewModel.cs @@ -1,11 +1,11 @@ using System; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Messaging; -using Wino.Core.Domain; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Navigation; -using Wino.Core.Messages.Navigation; +using Wino.Domain; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Navigation; +using Wino.Messaging.Client.Navigation; namespace Wino.Mail.ViewModels { diff --git a/Wino.Mail.ViewModels/SettingsPageViewModel.cs b/Wino.Mail.ViewModels/SettingsPageViewModel.cs index 212e698f..06cb93ca 100644 --- a/Wino.Mail.ViewModels/SettingsPageViewModel.cs +++ b/Wino.Mail.ViewModels/SettingsPageViewModel.cs @@ -1,4 +1,4 @@ -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; namespace Wino.Mail.ViewModels { diff --git a/Wino.Mail.ViewModels/SettingsViewModel.cs b/Wino.Mail.ViewModels/SettingsViewModel.cs index b905f9c5..cf19345f 100644 --- a/Wino.Mail.ViewModels/SettingsViewModel.cs +++ b/Wino.Mail.ViewModels/SettingsViewModel.cs @@ -1,4 +1,4 @@ -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; namespace Wino.Mail.ViewModels { diff --git a/Wino.Mail.ViewModels/SignatureManagementPageViewModel.cs b/Wino.Mail.ViewModels/SignatureManagementPageViewModel.cs index 732314b0..fbba07d8 100644 --- a/Wino.Mail.ViewModels/SignatureManagementPageViewModel.cs +++ b/Wino.Mail.ViewModels/SignatureManagementPageViewModel.cs @@ -7,10 +7,10 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; using MoreLinq; using MoreLinq.Extensions; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Navigation; +using Wino.Domain; +using Wino.Domain.Entities; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Navigation; namespace Wino.Mail.ViewModels { diff --git a/Wino.Mail.ViewModels/ViewModelContainerSetup.cs b/Wino.Mail.ViewModels/ViewModelContainerSetup.cs new file mode 100644 index 00000000..39242e20 --- /dev/null +++ b/Wino.Mail.ViewModels/ViewModelContainerSetup.cs @@ -0,0 +1,30 @@ +using Microsoft.Extensions.DependencyInjection; + +namespace Wino.Mail.ViewModels +{ + public static class ViewModelContainerSetup + { + public static void RegisterViewModels(this IServiceCollection services) + { + services.AddSingleton(typeof(AppShellViewModel)); + services.AddTransient(typeof(SettingsDialogViewModel)); + services.AddTransient(typeof(PersonalizationPageViewModel)); + services.AddTransient(typeof(SettingOptionsPageViewModel)); + services.AddTransient(typeof(MailListPageViewModel)); + services.AddTransient(typeof(MailRenderingPageViewModel)); + services.AddTransient(typeof(AccountManagementViewModel)); + services.AddTransient(typeof(WelcomePageViewModel)); + services.AddTransient(typeof(AboutPageViewModel)); + services.AddTransient(typeof(ComposePageViewModel)); + services.AddTransient(typeof(IdlePageViewModel)); + services.AddTransient(typeof(SettingsPageViewModel)); + services.AddTransient(typeof(NewAccountManagementPageViewModel)); + services.AddTransient(typeof(AccountDetailsPageViewModel)); + services.AddTransient(typeof(SignatureManagementPageViewModel)); + services.AddTransient(typeof(MessageListPageViewModel)); + services.AddTransient(typeof(ReadingPanePageViewModel)); + services.AddTransient(typeof(MergedAccountDetailsPageViewModel)); + services.AddTransient(typeof(LanguageTimePageViewModel)); + } + } +} diff --git a/Wino.Mail.ViewModels/WelcomePageViewModel.cs b/Wino.Mail.ViewModels/WelcomePageViewModel.cs index a5ddbda3..f9e5df61 100644 --- a/Wino.Mail.ViewModels/WelcomePageViewModel.cs +++ b/Wino.Mail.ViewModels/WelcomePageViewModel.cs @@ -1,8 +1,9 @@ using System; using CommunityToolkit.Mvvm.ComponentModel; -using Wino.Core.Domain; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Navigation; +using Wino.Domain; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Navigation; namespace Wino.Mail.ViewModels { @@ -30,7 +31,7 @@ namespace Wino.Mail.ViewModels } catch (Exception) { - DialogService.InfoBarMessage(Translator.GeneralTitle_Error, "Can't find the patch notes.", Core.Domain.Enums.InfoBarMessageType.Information); + DialogService.InfoBarMessage(Translator.GeneralTitle_Error, "Can't find the patch notes.", InfoBarMessageType.Information); } } } diff --git a/Wino.Mail.ViewModels/Wino.Mail.ViewModels.csproj b/Wino.Mail.ViewModels/Wino.Mail.ViewModels.csproj index be39b447..70506db8 100644 --- a/Wino.Mail.ViewModels/Wino.Mail.ViewModels.csproj +++ b/Wino.Mail.ViewModels/Wino.Mail.ViewModels.csproj @@ -8,16 +8,18 @@ + + + - - - + + diff --git a/Wino.Mail.sln b/Wino.Mail.sln index ada84a49..947f77e5 100644 --- a/Wino.Mail.sln +++ b/Wino.Mail.sln @@ -5,13 +5,7 @@ VisualStudioVersion = 17.11.35111.106 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{A30F530C-B42B-4C80-B709-775FC1617380}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Core.Domain", "Wino.Core.Domain\Wino.Core.Domain.csproj", "{A6A3574C-E120-4387-BF56-EE20C29CE5AB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Messaging", "Wino.Messages\Wino.Messaging.csproj", "{217E4E4A-135F-4D5B-981B-09C7592D0E65}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Core", "Wino.Core\Wino.Core.csproj", "{8EFCF883-99E1-45B3-9842-1510C1A08BFA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Shared", "Wino.Core.UWP\Wino.Shared.csproj", "{ACF8D522-157C-4372-B161-385C6884EB85}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Domain", "Wino.Core.Domain\Wino.Domain.csproj", "{A6A3574C-E120-4387-BF56-EE20C29CE5AB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Mail.ViewModels", "Wino.Mail.ViewModels\Wino.Mail.ViewModels.csproj", "{366AAC9F-04AE-4B26-8636-429FE3D90CA5}" EndProject @@ -19,7 +13,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Mail", "Wino.Mail\Wino EndProject Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "Wino.Packaging", "Wino.Packaging\Wino.Packaging.wapproj", "{FD8CEA2F-7741-426A-934F-4A20465A79F6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Server", "Wino.Server\Wino.Server.csproj", "{C4D62168-8A08-425B-A650-536F6FFF1FE5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Server", "Wino.Server.WPF\Wino.Server.csproj", "{A373BC05-C3A7-456E-A84C-366641E96B6A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Services", "Wino.Services\Wino.Services.csproj", "{41432043-7BB6-4A02-B3A6-CE306CCE83D1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Messaging", "Wino.Messaging\Wino.Messaging.csproj", "{0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Shared.WinRT", "Wino.Shared.WinRT\Wino.Shared.WinRT.csproj", "{BA81E073-5598-4C66-AEEA-8CA1329225F3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wino.Synchronization", "Wino.Synchronization\Wino.Synchronization.csproj", "{91319DF0-8633-4BF9-AD48-D1C2C03A7929}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -55,66 +57,6 @@ Global {A6A3574C-E120-4387-BF56-EE20C29CE5AB}.Release|x64.Build.0 = Release|Any CPU {A6A3574C-E120-4387-BF56-EE20C29CE5AB}.Release|x86.ActiveCfg = Release|Any CPU {A6A3574C-E120-4387-BF56-EE20C29CE5AB}.Release|x86.Build.0 = Release|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Debug|Any CPU.Build.0 = Debug|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Debug|ARM.ActiveCfg = Debug|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Debug|ARM.Build.0 = Debug|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Debug|ARM64.Build.0 = Debug|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Debug|x64.ActiveCfg = Debug|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Debug|x64.Build.0 = Debug|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Debug|x86.ActiveCfg = Debug|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Debug|x86.Build.0 = Debug|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Release|Any CPU.ActiveCfg = Release|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Release|Any CPU.Build.0 = Release|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Release|ARM.ActiveCfg = Release|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Release|ARM.Build.0 = Release|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Release|ARM64.ActiveCfg = Release|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Release|ARM64.Build.0 = Release|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Release|x64.ActiveCfg = Release|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Release|x64.Build.0 = Release|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Release|x86.ActiveCfg = Release|Any CPU - {217E4E4A-135F-4D5B-981B-09C7592D0E65}.Release|x86.Build.0 = Release|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Debug|ARM.ActiveCfg = Debug|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Debug|ARM.Build.0 = Debug|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Debug|ARM64.Build.0 = Debug|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Debug|x64.ActiveCfg = Debug|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Debug|x64.Build.0 = Debug|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Debug|x86.ActiveCfg = Debug|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Debug|x86.Build.0 = Debug|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Release|Any CPU.Build.0 = Release|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Release|ARM.ActiveCfg = Release|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Release|ARM.Build.0 = Release|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Release|ARM64.ActiveCfg = Release|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Release|ARM64.Build.0 = Release|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Release|x64.ActiveCfg = Release|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Release|x64.Build.0 = Release|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Release|x86.ActiveCfg = Release|Any CPU - {8EFCF883-99E1-45B3-9842-1510C1A08BFA}.Release|x86.Build.0 = Release|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Debug|ARM.ActiveCfg = Debug|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Debug|ARM.Build.0 = Debug|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Debug|ARM64.Build.0 = Debug|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Debug|x64.ActiveCfg = Debug|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Debug|x64.Build.0 = Debug|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Debug|x86.ActiveCfg = Debug|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Debug|x86.Build.0 = Debug|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Release|Any CPU.Build.0 = Release|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Release|ARM.ActiveCfg = Release|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Release|ARM.Build.0 = Release|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Release|ARM64.ActiveCfg = Release|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Release|ARM64.Build.0 = Release|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Release|x64.ActiveCfg = Release|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Release|x64.Build.0 = Release|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Release|x86.ActiveCfg = Release|Any CPU - {ACF8D522-157C-4372-B161-385C6884EB85}.Release|x86.Build.0 = Release|Any CPU {366AAC9F-04AE-4B26-8636-429FE3D90CA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {366AAC9F-04AE-4B26-8636-429FE3D90CA5}.Debug|Any CPU.Build.0 = Debug|Any CPU {366AAC9F-04AE-4B26-8636-429FE3D90CA5}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -185,46 +127,117 @@ Global {FD8CEA2F-7741-426A-934F-4A20465A79F6}.Release|x86.ActiveCfg = Release|x86 {FD8CEA2F-7741-426A-934F-4A20465A79F6}.Release|x86.Build.0 = Release|x86 {FD8CEA2F-7741-426A-934F-4A20465A79F6}.Release|x86.Deploy.0 = Release|x86 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|Any CPU.ActiveCfg = Debug|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|Any CPU.Build.0 = Debug|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|Any CPU.Deploy.0 = Debug|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM.ActiveCfg = Debug|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM.Build.0 = Debug|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM.Deploy.0 = Debug|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM64.Build.0 = Debug|ARM64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|ARM64.Deploy.0 = Debug|ARM64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x64.ActiveCfg = Debug|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x64.Build.0 = Debug|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x64.Deploy.0 = Debug|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x86.ActiveCfg = Debug|x86 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x86.Build.0 = Debug|x86 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Debug|x86.Deploy.0 = Debug|x86 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|Any CPU.ActiveCfg = Release|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|Any CPU.Build.0 = Release|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|Any CPU.Deploy.0 = Release|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM.ActiveCfg = Release|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM.Build.0 = Release|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM.Deploy.0 = Release|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM64.ActiveCfg = Release|ARM64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM64.Build.0 = Release|ARM64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|ARM64.Deploy.0 = Release|ARM64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x64.ActiveCfg = Release|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x64.Build.0 = Release|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x64.Deploy.0 = Release|x64 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x86.ActiveCfg = Release|x86 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x86.Build.0 = Release|x86 - {C4D62168-8A08-425B-A650-536F6FFF1FE5}.Release|x86.Deploy.0 = Release|x86 + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Debug|ARM.ActiveCfg = Debug|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Debug|ARM.Build.0 = Debug|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Debug|ARM64.Build.0 = Debug|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Debug|x64.ActiveCfg = Debug|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Debug|x64.Build.0 = Debug|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Debug|x86.ActiveCfg = Debug|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Debug|x86.Build.0 = Debug|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Release|Any CPU.Build.0 = Release|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Release|ARM.ActiveCfg = Release|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Release|ARM.Build.0 = Release|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Release|ARM64.ActiveCfg = Release|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Release|ARM64.Build.0 = Release|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Release|x64.ActiveCfg = Release|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Release|x64.Build.0 = Release|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Release|x86.ActiveCfg = Release|Any CPU + {A373BC05-C3A7-456E-A84C-366641E96B6A}.Release|x86.Build.0 = Release|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Debug|ARM.ActiveCfg = Debug|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Debug|ARM.Build.0 = Debug|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Debug|ARM64.Build.0 = Debug|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Debug|x64.ActiveCfg = Debug|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Debug|x64.Build.0 = Debug|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Debug|x86.ActiveCfg = Debug|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Debug|x86.Build.0 = Debug|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Release|Any CPU.Build.0 = Release|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Release|ARM.ActiveCfg = Release|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Release|ARM.Build.0 = Release|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Release|ARM64.ActiveCfg = Release|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Release|ARM64.Build.0 = Release|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Release|x64.ActiveCfg = Release|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Release|x64.Build.0 = Release|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Release|x86.ActiveCfg = Release|Any CPU + {41432043-7BB6-4A02-B3A6-CE306CCE83D1}.Release|x86.Build.0 = Release|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Debug|ARM.ActiveCfg = Debug|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Debug|ARM.Build.0 = Debug|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Debug|ARM64.Build.0 = Debug|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Debug|x64.ActiveCfg = Debug|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Debug|x64.Build.0 = Debug|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Debug|x86.ActiveCfg = Debug|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Debug|x86.Build.0 = Debug|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Release|Any CPU.Build.0 = Release|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Release|ARM.ActiveCfg = Release|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Release|ARM.Build.0 = Release|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Release|ARM64.ActiveCfg = Release|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Release|ARM64.Build.0 = Release|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Release|x64.ActiveCfg = Release|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Release|x64.Build.0 = Release|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Release|x86.ActiveCfg = Release|Any CPU + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF}.Release|x86.Build.0 = Release|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Debug|ARM.ActiveCfg = Debug|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Debug|ARM.Build.0 = Debug|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Debug|ARM64.Build.0 = Debug|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Debug|x64.ActiveCfg = Debug|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Debug|x64.Build.0 = Debug|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Debug|x86.ActiveCfg = Debug|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Debug|x86.Build.0 = Debug|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Release|Any CPU.Build.0 = Release|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Release|ARM.ActiveCfg = Release|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Release|ARM.Build.0 = Release|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Release|ARM64.ActiveCfg = Release|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Release|ARM64.Build.0 = Release|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Release|x64.ActiveCfg = Release|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Release|x64.Build.0 = Release|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Release|x86.ActiveCfg = Release|Any CPU + {BA81E073-5598-4C66-AEEA-8CA1329225F3}.Release|x86.Build.0 = Release|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Debug|ARM.ActiveCfg = Debug|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Debug|ARM.Build.0 = Debug|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Debug|ARM64.Build.0 = Debug|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Debug|x64.ActiveCfg = Debug|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Debug|x64.Build.0 = Debug|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Debug|x86.ActiveCfg = Debug|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Debug|x86.Build.0 = Debug|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Release|Any CPU.Build.0 = Release|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Release|ARM.ActiveCfg = Release|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Release|ARM.Build.0 = Release|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Release|ARM64.ActiveCfg = Release|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Release|ARM64.Build.0 = Release|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Release|x64.ActiveCfg = Release|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Release|x64.Build.0 = Release|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Release|x86.ActiveCfg = Release|Any CPU + {91319DF0-8633-4BF9-AD48-D1C2C03A7929}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {A6A3574C-E120-4387-BF56-EE20C29CE5AB} = {A30F530C-B42B-4C80-B709-775FC1617380} - {217E4E4A-135F-4D5B-981B-09C7592D0E65} = {A30F530C-B42B-4C80-B709-775FC1617380} - {8EFCF883-99E1-45B3-9842-1510C1A08BFA} = {A30F530C-B42B-4C80-B709-775FC1617380} - {ACF8D522-157C-4372-B161-385C6884EB85} = {A30F530C-B42B-4C80-B709-775FC1617380} {366AAC9F-04AE-4B26-8636-429FE3D90CA5} = {A30F530C-B42B-4C80-B709-775FC1617380} + {41432043-7BB6-4A02-B3A6-CE306CCE83D1} = {A30F530C-B42B-4C80-B709-775FC1617380} + {0CA1DE1A-EDA9-4CE2-8BB4-66DF23F11CCF} = {A30F530C-B42B-4C80-B709-775FC1617380} + {BA81E073-5598-4C66-AEEA-8CA1329225F3} = {A30F530C-B42B-4C80-B709-775FC1617380} + {91319DF0-8633-4BF9-AD48-D1C2C03A7929} = {A30F530C-B42B-4C80-B709-775FC1617380} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4DA93409-EDF8-4E9B-86C6-4776AA552F2C} diff --git a/Wino.Mail/App.xaml.cs b/Wino.Mail/App.xaml.cs index 4834a770..834ecfe3 100644 --- a/Wino.Mail/App.xaml.cs +++ b/Wino.Mail/App.xaml.cs @@ -5,9 +5,9 @@ using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media; using Windows.Storage; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Services; -using Wino.Core.WinUI.Services; +using Wino.Domain; +using Wino.Domain.Interfaces; +using Wino.Shared.WinRT.Services; using Wino.Views; using WinUIEx; namespace Wino @@ -37,7 +37,7 @@ namespace Wino // Make sure the paths are setup on app start. _applicationFolderConfiguration.ApplicationDataFolderPath = ApplicationData.Current.LocalFolder.Path; - _applicationFolderConfiguration.PublisherSharedFolderPath = ApplicationData.Current.GetPublisherCacheFolder(ApplicationConfiguration.SharedFolderName).Path; + _applicationFolderConfiguration.PublisherSharedFolderPath = ApplicationData.Current.GetPublisherCacheFolder(Constants.SharedFolderName).Path; _themeService = Services.GetService(); _databaseService = Services.GetService(); diff --git a/Wino.Mail/AppShell.xaml b/Wino.Mail/AppShell.xaml index 90f79b36..e1c43fc4 100644 --- a/Wino.Mail/AppShell.xaml +++ b/Wino.Mail/AppShell.xaml @@ -9,11 +9,11 @@ xmlns:controls="using:Wino.Controls" xmlns:controls1="using:CommunityToolkit.WinUI.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:domain="using:Wino.Core.Domain" - xmlns:enums="using:Wino.Core.Domain.Enums" + xmlns:domain="using:Wino.Domain" + xmlns:enums="using:Wino.Domain.Enums" xmlns:helpers="using:Wino.Helpers" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:menu="using:Wino.Core.MenuItems" + xmlns:menu="using:Wino.Mail.ViewModels.Data.MenuItems" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:selectors="using:Wino.Selectors" x:Name="Root" diff --git a/Wino.Mail/AppShell.xaml.cs b/Wino.Mail/AppShell.xaml.cs index d5d02f8a..8e3e899f 100644 --- a/Wino.Mail/AppShell.xaml.cs +++ b/Wino.Mail/AppShell.xaml.cs @@ -7,21 +7,24 @@ using CommunityToolkit.Mvvm.Messaging; using Windows.Foundation; using Wino.Controls; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Navigation; -using Wino.Core.Messages.Accounts; -using Wino.Core.Messages.Mails; -using Wino.Core.Messages.Shell; +using Wino.Domain; +using Wino.Domain.Models.Navigation; using Wino.Extensions; using Wino.Mail.ViewModels.Data; using Wino.MenuFlyouts; using Wino.MenuFlyouts.Context; using Wino.Views.Abstract; using Microsoft.UI.Xaml.Controls; +using Wino.Messaging.Client.Shell; +using Wino.Messaging.Client.Mails; +using Wino.Messaging.Client.Accounts; +using Wino.Domain.Entities; +using Wino.Domain.Models.Folders; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.MailItem; + + + #if NET8_0 diff --git a/Wino.Mail/BasePage.cs b/Wino.Mail/BasePage.cs index 7ee5cd49..d2d2b46a 100644 --- a/Wino.Mail/BasePage.cs +++ b/Wino.Mail/BasePage.cs @@ -5,8 +5,9 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; -using Wino.Core.Messages.Shell; using Wino.Mail.ViewModels; +using Wino.Messaging.Client.Shell; +using Wino.Shared.WinRT; namespace Wino { @@ -69,9 +70,9 @@ namespace Wino GC.Collect(); } - private Core.Domain.Models.Navigation.NavigationMode GetNavigationMode(NavigationMode mode) + private Domain.Models.Navigation.NavigationMode GetNavigationMode(Microsoft.UI.Xaml.Navigation.NavigationMode mode) { - return (Core.Domain.Models.Navigation.NavigationMode)mode; + return (Domain.Models.Navigation.NavigationMode)mode; } } } diff --git a/Wino.Mail/Behaviors/BindableCommandBarBehavior.cs b/Wino.Mail/Behaviors/BindableCommandBarBehavior.cs index 86814fd2..f43f28fb 100644 --- a/Wino.Mail/Behaviors/BindableCommandBarBehavior.cs +++ b/Wino.Mail/Behaviors/BindableCommandBarBehavior.cs @@ -4,8 +4,11 @@ using System.Windows.Input; using Microsoft.Xaml.Interactivity; using Wino.Controls; -using Wino.Core.Domain.Models.Menus; using Wino.Helpers; +using Wino.Domain.Models.Menus; +using Wino.Domain.Enums; + + #if NET8_0 using Microsoft.UI.Xaml; @@ -108,7 +111,7 @@ namespace Wino.Behaviors { ICommandBarElement menuItem = null; - if (mailOperationMenuItem.Operation == Core.Domain.Enums.MailOperation.Seperator) + if (mailOperationMenuItem.Operation == MailOperation.Seperator) { menuItem = new AppBarSeparator(); } diff --git a/Wino.Mail/Behaviors/CreateMailNavigationItemBehavior.cs b/Wino.Mail/Behaviors/CreateMailNavigationItemBehavior.cs index 2c3c610a..66a70abb 100644 --- a/Wino.Mail/Behaviors/CreateMailNavigationItemBehavior.cs +++ b/Wino.Mail/Behaviors/CreateMailNavigationItemBehavior.cs @@ -2,7 +2,9 @@ using Microsoft.Xaml.Interactivity; using Wino.Controls; -using Wino.Core.MenuItems; +using Wino.Mail.ViewModels.Data.MenuItems; + + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Controls/AccountNavigationItem.cs b/Wino.Mail/Controls/AccountNavigationItem.cs index 280413d1..6726cc97 100644 --- a/Wino.Mail/Controls/AccountNavigationItem.cs +++ b/Wino.Mail/Controls/AccountNavigationItem.cs @@ -1,7 +1,7 @@ using System.Numerics; using Microsoft.UI.Xaml.Controls; +using Wino.Domain.Interfaces; -using Wino.Core.Domain.Interfaces; #if NET8_0 diff --git a/Wino.Mail/Controls/Advanced/WinoAppTitleBar.xaml.cs b/Wino.Mail/Controls/Advanced/WinoAppTitleBar.xaml.cs index 2c85e7c6..0e83377b 100644 --- a/Wino.Mail/Controls/Advanced/WinoAppTitleBar.xaml.cs +++ b/Wino.Mail/Controls/Advanced/WinoAppTitleBar.xaml.cs @@ -1,6 +1,8 @@ using Windows.Foundation; -using Wino.Core.WinUI.Services; using Microsoft.Extensions.DependencyInjection; +using Wino.Shared.WinRT.Services; + + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Controls/Advanced/WinoListView.cs b/Wino.Mail/Controls/Advanced/WinoListView.cs index 01bf53f8..4f44ce08 100644 --- a/Wino.Mail/Controls/Advanced/WinoListView.cs +++ b/Wino.Mail/Controls/Advanced/WinoListView.cs @@ -5,12 +5,13 @@ using CommunityToolkit.Mvvm.Messaging; using Microsoft.UI.Xaml.Controls; using MoreLinq; using Serilog; - -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.MailItem; using Wino.Extensions; using Wino.Mail.ViewModels.Data; using Wino.Mail.ViewModels.Messages; +using Wino.Domain.Enums; +using Wino.Domain.Models.MailItem; + + #if NET8_0 diff --git a/Wino.Mail/Controls/ImagePreviewControl.cs b/Wino.Mail/Controls/ImagePreviewControl.cs index 4b3b2d77..38e16d07 100644 --- a/Wino.Mail/Controls/ImagePreviewControl.cs +++ b/Wino.Mail/Controls/ImagePreviewControl.cs @@ -2,8 +2,9 @@ using System.Text.RegularExpressions; using Fernandezja.ColorHashSharp; using Windows.UI; +using Wino.Shared.WinRT.Services; + -using Wino.Core.Services; #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Controls/MailItemDisplayInformationControl.xaml b/Wino.Mail/Controls/MailItemDisplayInformationControl.xaml index 2e0e45b5..b48b115b 100644 --- a/Wino.Mail/Controls/MailItemDisplayInformationControl.xaml +++ b/Wino.Mail/Controls/MailItemDisplayInformationControl.xaml @@ -3,8 +3,8 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="using:Wino.Controls" - xmlns:enums="using:Wino.Core.Domain.Enums" - xmlns:domain="using:Wino.Core.Domain" + xmlns:enums="using:Wino.Domain.Enums" + xmlns:domain="using:Wino.Domain" xmlns:helpers="using:Wino.Helpers" PointerEntered="ControlPointerEntered" PointerExited="ControlPointerExited"> diff --git a/Wino.Mail/Controls/MailItemDisplayInformationControl.xaml.cs b/Wino.Mail/Controls/MailItemDisplayInformationControl.xaml.cs index fd57ef86..e34f2947 100644 --- a/Wino.Mail/Controls/MailItemDisplayInformationControl.xaml.cs +++ b/Wino.Mail/Controls/MailItemDisplayInformationControl.xaml.cs @@ -3,11 +3,12 @@ using System.ComponentModel; using System.Numerics; using System.Windows.Input; using Microsoft.UI.Xaml.Controls; - -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.MailItem; using Wino.Extensions; using Wino.Mail.ViewModels.Data; +using Wino.Domain.Enums; +using Wino.Domain.Models.MailItem; + + #if NET8_0 using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Input; diff --git a/Wino.Mail/Controls/RendererCommandBar.cs b/Wino.Mail/Controls/RendererCommandBar.cs index 856bd155..7cee67be 100644 --- a/Wino.Mail/Controls/RendererCommandBar.cs +++ b/Wino.Mail/Controls/RendererCommandBar.cs @@ -2,11 +2,12 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Windows.Input; - -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Menus; using Wino.Helpers; using Wino.MenuFlyouts; +using Wino.Domain.Models.Menus; +using Wino.Domain.Enums; + + #if NET8_0 using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/Wino.Mail/Controls/WinoInfoBar.cs b/Wino.Mail/Controls/WinoInfoBar.cs index 3b66dc04..a9bcd741 100644 --- a/Wino.Mail/Controls/WinoInfoBar.cs +++ b/Wino.Mail/Controls/WinoInfoBar.cs @@ -2,9 +2,9 @@ using System.Numerics; using Microsoft.UI.Xaml.Controls; - -using Wino.Core.Domain.Enums; using CommunityToolkit.WinUI.Animations; +using Wino.Domain.Enums; + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Controls/WinoSwipeControlItems.cs b/Wino.Mail/Controls/WinoSwipeControlItems.cs index 031db742..439048b8 100644 --- a/Wino.Mail/Controls/WinoSwipeControlItems.cs +++ b/Wino.Mail/Controls/WinoSwipeControlItems.cs @@ -1,10 +1,11 @@ using System.Linq; using Microsoft.UI.Xaml.Controls; - -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.MailItem; using Wino.Helpers; using Wino.Mail.ViewModels.Data; +using Wino.Domain.Enums; +using Wino.Domain.Models.MailItem; + + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Dialogs/AccountCreationDialog.xaml b/Wino.Mail/Dialogs/AccountCreationDialog.xaml index 98cac4d6..d2b33ef7 100644 --- a/Wino.Mail/Dialogs/AccountCreationDialog.xaml +++ b/Wino.Mail/Dialogs/AccountCreationDialog.xaml @@ -5,7 +5,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:domain="using:Wino.Core.Domain" + xmlns:domain="using:Wino.Domain" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Name="Root" CornerRadius="8" diff --git a/Wino.Mail/Dialogs/AccountCreationDialog.xaml.cs b/Wino.Mail/Dialogs/AccountCreationDialog.xaml.cs index d100a983..23a799c4 100644 --- a/Wino.Mail/Dialogs/AccountCreationDialog.xaml.cs +++ b/Wino.Mail/Dialogs/AccountCreationDialog.xaml.cs @@ -1,4 +1,4 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; using Wino.Helpers; namespace Wino.Dialogs diff --git a/Wino.Mail/Dialogs/AccountEditDialog.xaml b/Wino.Mail/Dialogs/AccountEditDialog.xaml index 34cba8f8..c94d9980 100644 --- a/Wino.Mail/Dialogs/AccountEditDialog.xaml +++ b/Wino.Mail/Dialogs/AccountEditDialog.xaml @@ -2,7 +2,7 @@ x:Class="Wino.Dialogs.AccountEditDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:domain="using:Wino.Core.Domain" + xmlns:domain="using:Wino.Domain" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" diff --git a/Wino.Mail/Dialogs/AccountEditDialog.xaml.cs b/Wino.Mail/Dialogs/AccountEditDialog.xaml.cs index 9729dc6b..7f254dcc 100644 --- a/Wino.Mail/Dialogs/AccountEditDialog.xaml.cs +++ b/Wino.Mail/Dialogs/AccountEditDialog.xaml.cs @@ -1,5 +1,5 @@ - -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; + #if NET8_0 using Microsoft.UI.Xaml.Controls; diff --git a/Wino.Mail/Dialogs/AccountPickerDialog.xaml b/Wino.Mail/Dialogs/AccountPickerDialog.xaml index f06da6d2..58120339 100644 --- a/Wino.Mail/Dialogs/AccountPickerDialog.xaml +++ b/Wino.Mail/Dialogs/AccountPickerDialog.xaml @@ -7,7 +7,7 @@ mc:Ignorable="d" Style="{StaticResource WinoDialogStyle}" PrimaryButtonText="{x:Bind domain:Translator.Buttons_Cancel}" - xmlns:domain="using:Wino.Core.Domain" + xmlns:domain="using:Wino.Domain" Title="{x:Bind domain:Translator.AccountPickerDialog_Title}"> diff --git a/Wino.Mail/Dialogs/MoveMailDialog.xaml.cs b/Wino.Mail/Dialogs/MoveMailDialog.xaml.cs index e7278b4e..1545527b 100644 --- a/Wino.Mail/Dialogs/MoveMailDialog.xaml.cs +++ b/Wino.Mail/Dialogs/MoveMailDialog.xaml.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; -using Wino.Core.Domain; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain; +using Wino.Domain.Models.Folders; + #if NET8_0 using Microsoft.UI.Xaml.Controls; diff --git a/Wino.Mail/Dialogs/NewAccountDialog.xaml b/Wino.Mail/Dialogs/NewAccountDialog.xaml index a763228a..f441464c 100644 --- a/Wino.Mail/Dialogs/NewAccountDialog.xaml +++ b/Wino.Mail/Dialogs/NewAccountDialog.xaml @@ -4,14 +4,14 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:accounts="using:Wino.Core.Domain.Models.Accounts" + xmlns:accounts="using:Wino.Domain.Models.Accounts" Title="{x:Bind domain:Translator.NewAccountDialog_Title}" Style="{StaticResource WinoDialogStyle}" HorizontalContentAlignment="Stretch" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" IsPrimaryButtonEnabled="False" Opened="DialogOpened" - xmlns:domain="using:Wino.Core.Domain" + xmlns:domain="using:Wino.Domain" PrimaryButtonClick="CreateClicked" DefaultButton="Primary" PrimaryButtonText="{x:Bind domain:Translator.Buttons_CreateAccount}" diff --git a/Wino.Mail/Dialogs/NewAccountDialog.xaml.cs b/Wino.Mail/Dialogs/NewAccountDialog.xaml.cs index b4112d13..a258a3f8 100644 --- a/Wino.Mail/Dialogs/NewAccountDialog.xaml.cs +++ b/Wino.Mail/Dialogs/NewAccountDialog.xaml.cs @@ -1,6 +1,10 @@ using System.Collections.Generic; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Accounts; +using Wino.Domain.Models.Accounts; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; + + + #if NET8_0 using Microsoft.UI.Xaml.Controls; @@ -83,7 +87,7 @@ namespace Wino.Dialogs private void ValidateNames() { AccountNameTextbox.IsEnabled = SelectedMailProvider != null; - SenderNameTextbox.IsEnabled = SelectedMailProvider != null && SelectedMailProvider.Type != Core.Domain.Enums.MailProviderType.IMAP4; + SenderNameTextbox.IsEnabled = SelectedMailProvider != null && SelectedMailProvider.Type != MailProviderType.IMAP4; } private void DialogOpened(ContentDialog sender, ContentDialogOpenedEventArgs args) => Validate(); diff --git a/Wino.Mail/Dialogs/NewImapSetupDialog.xaml.cs b/Wino.Mail/Dialogs/NewImapSetupDialog.xaml.cs index b87a2df8..43640b9d 100644 --- a/Wino.Mail/Dialogs/NewImapSetupDialog.xaml.cs +++ b/Wino.Mail/Dialogs/NewImapSetupDialog.xaml.cs @@ -1,12 +1,14 @@ using System; using System.Threading.Tasks; using CommunityToolkit.Mvvm.Messaging; - -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Messages.Mails; using Wino.Views.ImapSetup; +using Wino.Messaging.Client.Mails; +using Wino.Domain.Entities; +using Wino.Domain.Enums; +using Wino.Domain.Interfaces; + + + #if NET8_0 diff --git a/Wino.Mail/Dialogs/SignatureEditorDialog.xaml b/Wino.Mail/Dialogs/SignatureEditorDialog.xaml index 3326191c..e0727d83 100644 --- a/Wino.Mail/Dialogs/SignatureEditorDialog.xaml +++ b/Wino.Mail/Dialogs/SignatureEditorDialog.xaml @@ -2,11 +2,11 @@ x:Class="Wino.Dialogs.SignatureEditorDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:accounts="using:Wino.Core.Domain.Models.Accounts" + xmlns:accounts="using:Wino.Domain.Models.Accounts" xmlns:controls="using:Wino.Controls" xmlns:controls1="using:CommunityToolkit.WinUI.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:domain="using:Wino.Core.Domain" + xmlns:domain="using:Wino.Domain" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" Title="{x:Bind domain:Translator.SignatureEditorDialog_Title}" diff --git a/Wino.Mail/Dialogs/SignatureEditorDialog.xaml.cs b/Wino.Mail/Dialogs/SignatureEditorDialog.xaml.cs index 53a7b412..bc4b6f03 100644 --- a/Wino.Mail/Dialogs/SignatureEditorDialog.xaml.cs +++ b/Wino.Mail/Dialogs/SignatureEditorDialog.xaml.cs @@ -5,11 +5,14 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Web.WebView2.Core; using Windows.UI.ViewManagement.Core; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Reader; +using Wino.Domain; using Wino.Views.Settings; +using Wino.Domain.Models.Reader; +using Wino.Domain.Entities; +using Wino.Domain.Interfaces; + + + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Dialogs/StoreRatingDialog.xaml b/Wino.Mail/Dialogs/StoreRatingDialog.xaml index be839312..a9e43b3c 100644 --- a/Wino.Mail/Dialogs/StoreRatingDialog.xaml +++ b/Wino.Mail/Dialogs/StoreRatingDialog.xaml @@ -6,7 +6,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" - xmlns:domain="using:Wino.Core.Domain" + xmlns:domain="using:Wino.Domain" PrimaryButtonText="{x:Bind domain:Translator.Buttons_RateWino}" SecondaryButtonText="{x:Bind domain:Translator.Buttons_No}" DefaultButton="Primary" diff --git a/Wino.Mail/Dialogs/StoreRatingDialog.xaml.cs b/Wino.Mail/Dialogs/StoreRatingDialog.xaml.cs index 22eb1680..c1fef6fd 100644 --- a/Wino.Mail/Dialogs/StoreRatingDialog.xaml.cs +++ b/Wino.Mail/Dialogs/StoreRatingDialog.xaml.cs @@ -1,4 +1,5 @@ -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; + #if NET8_0 using Microsoft.UI.Xaml.Controls; diff --git a/Wino.Mail/Dialogs/SystemFolderConfigurationDialog.xaml b/Wino.Mail/Dialogs/SystemFolderConfigurationDialog.xaml index 44b98813..ce104c59 100644 --- a/Wino.Mail/Dialogs/SystemFolderConfigurationDialog.xaml +++ b/Wino.Mail/Dialogs/SystemFolderConfigurationDialog.xaml @@ -11,7 +11,7 @@ DefaultButton="Primary" IsPrimaryButtonEnabled="True" SecondaryButtonText="{x:Bind domain:Translator.Buttons_Cancel}" - xmlns:domain="using:Wino.Core.Domain" + xmlns:domain="using:Wino.Domain" PrimaryButtonText="{x:Bind domain:Translator.Buttons_SaveConfiguration}" PrimaryButtonClick="SaveClicked" Closing="DialogClosing" diff --git a/Wino.Mail/Dialogs/SystemFolderConfigurationDialog.xaml.cs b/Wino.Mail/Dialogs/SystemFolderConfigurationDialog.xaml.cs index 8332d234..b8dd0be0 100644 --- a/Wino.Mail/Dialogs/SystemFolderConfigurationDialog.xaml.cs +++ b/Wino.Mail/Dialogs/SystemFolderConfigurationDialog.xaml.cs @@ -1,9 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; +using Wino.Domain; +using Wino.Domain.Entities; +using Wino.Domain.Enums; + + #if NET8_0 using Microsoft.UI.Xaml.Controls; @@ -31,11 +33,11 @@ namespace Wino.Dialogs AvailableFolders = availableFolders; - Sent = AvailableFolders.Find(a => a.SpecialFolderType == Core.Domain.Enums.SpecialFolderType.Sent); - Draft = AvailableFolders.Find(a => a.SpecialFolderType == Core.Domain.Enums.SpecialFolderType.Draft); - Archive = AvailableFolders.Find(a => a.SpecialFolderType == Core.Domain.Enums.SpecialFolderType.Archive); - Junk = AvailableFolders.Find(a => a.SpecialFolderType == Core.Domain.Enums.SpecialFolderType.Junk); - Trash = AvailableFolders.Find(a => a.SpecialFolderType == Core.Domain.Enums.SpecialFolderType.Deleted); + Sent = AvailableFolders.Find(a => a.SpecialFolderType == SpecialFolderType.Sent); + Draft = AvailableFolders.Find(a => a.SpecialFolderType == SpecialFolderType.Draft); + Archive = AvailableFolders.Find(a => a.SpecialFolderType == SpecialFolderType.Archive); + Junk = AvailableFolders.Find(a => a.SpecialFolderType == SpecialFolderType.Junk); + Trash = AvailableFolders.Find(a => a.SpecialFolderType == SpecialFolderType.Deleted); } private void DialogClosing(ContentDialog sender, ContentDialogClosingEventArgs args) diff --git a/Wino.Mail/Dialogs/TextInputDialog.xaml b/Wino.Mail/Dialogs/TextInputDialog.xaml index 6ca651f1..c272e8ed 100644 --- a/Wino.Mail/Dialogs/TextInputDialog.xaml +++ b/Wino.Mail/Dialogs/TextInputDialog.xaml @@ -7,7 +7,7 @@ Style="{StaticResource WinoDialogStyle}" DefaultButton="Primary" HorizontalContentAlignment="Stretch" - xmlns:domain="using:Wino.Core.Domain" + xmlns:domain="using:Wino.Domain" PrimaryButtonClick="UpdateOrCreateClicked" SecondaryButtonText="{x:Bind domain:Translator.Buttons_Cancel}" SecondaryButtonClick="CancelClicked" diff --git a/Wino.Mail/Dialogs/WinoMessageDialog.xaml b/Wino.Mail/Dialogs/WinoMessageDialog.xaml index d61fc010..5e00f6ce 100644 --- a/Wino.Mail/Dialogs/WinoMessageDialog.xaml +++ b/Wino.Mail/Dialogs/WinoMessageDialog.xaml @@ -5,7 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Title="{x:Bind DialogTitle, Mode=OneWay}" - xmlns:domain="using:Wino.Core.Domain" + xmlns:domain="using:Wino.Domain" Style="{StaticResource WinoDialogStyle}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" diff --git a/Wino.Mail/Extensions/UIExtensions.cs b/Wino.Mail/Extensions/UIExtensions.cs index 65a4723b..6fcb7b8a 100644 --- a/Wino.Mail/Extensions/UIExtensions.cs +++ b/Wino.Mail/Extensions/UIExtensions.cs @@ -1,5 +1,5 @@ using Microsoft.UI.Xaml.Controls; -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; namespace Wino.Extensions { diff --git a/Wino.Mail/Helpers/XamlHelpers.cs b/Wino.Mail/Helpers/XamlHelpers.cs index e3a326f6..2c94fcdc 100644 --- a/Wino.Mail/Helpers/XamlHelpers.cs +++ b/Wino.Mail/Helpers/XamlHelpers.cs @@ -3,11 +3,14 @@ using System.Linq; using Microsoft.UI.Xaml.Controls; using Wino.Controls; -using Wino.Core.Domain; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Reader; +using Wino.Domain; using Windows.UI.Text; +using Wino.Domain.Models.Reader; +using Wino.Domain.Enums; +using Wino.Domain.Models.MailItem; + + + #if NET8_0 using Microsoft.UI; diff --git a/Wino.Mail/MenuFlyouts/AccountSelectorFlyout.cs b/Wino.Mail/MenuFlyouts/AccountSelectorFlyout.cs index f1b97de7..d34280d0 100644 --- a/Wino.Mail/MenuFlyouts/AccountSelectorFlyout.cs +++ b/Wino.Mail/MenuFlyouts/AccountSelectorFlyout.cs @@ -4,8 +4,9 @@ using System.Linq; using System.Threading.Tasks; using Wino.Controls; -using Wino.Core.Domain.Entities; using Wino.Helpers; +using Wino.Domain.Entities; + #if NET8_0 using Microsoft.UI.Xaml.Controls; diff --git a/Wino.Mail/MenuFlyouts/FilterMenuFlyout.cs b/Wino.Mail/MenuFlyouts/FilterMenuFlyout.cs index 0694af62..cd0acc0a 100644 --- a/Wino.Mail/MenuFlyouts/FilterMenuFlyout.cs +++ b/Wino.Mail/MenuFlyouts/FilterMenuFlyout.cs @@ -2,8 +2,9 @@ using System.Linq; using CommunityToolkit.Mvvm.Input; using Wino.Controls; -using Wino.Core.Domain.Models.Reader; using Wino.Helpers; +using Wino.Domain.Models.Reader; + #if NET8_0 using Microsoft.UI.Xaml.Controls; diff --git a/Wino.Mail/MenuFlyouts/FolderOperationFlyout.cs b/Wino.Mail/MenuFlyouts/FolderOperationFlyout.cs index 7555eee5..98ceab77 100644 --- a/Wino.Mail/MenuFlyouts/FolderOperationFlyout.cs +++ b/Wino.Mail/MenuFlyouts/FolderOperationFlyout.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Threading.Tasks; +using Wino.Domain.Models.Folders; +using Wino.Domain.Enums; + -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Folders; #if NET8_0 using Microsoft.UI.Xaml.Controls; diff --git a/Wino.Mail/MenuFlyouts/FolderOperationMenuFlyoutItem.cs b/Wino.Mail/MenuFlyouts/FolderOperationMenuFlyoutItem.cs index c6b788c6..155b8cfa 100644 --- a/Wino.Mail/MenuFlyouts/FolderOperationMenuFlyoutItem.cs +++ b/Wino.Mail/MenuFlyouts/FolderOperationMenuFlyoutItem.cs @@ -1,5 +1,5 @@ using System; -using Wino.Core.Domain.Models.Folders; +using Wino.Domain.Models.Folders; namespace Wino.MenuFlyouts { diff --git a/Wino.Mail/MenuFlyouts/MailOperationFlyout.cs b/Wino.Mail/MenuFlyouts/MailOperationFlyout.cs index 82bf125b..03bb24d0 100644 --- a/Wino.Mail/MenuFlyouts/MailOperationFlyout.cs +++ b/Wino.Mail/MenuFlyouts/MailOperationFlyout.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Threading.Tasks; +using Wino.Domain.Models.Menus; +using Wino.Domain.Enums; + -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Menus; #if NET8_0 diff --git a/Wino.Mail/MenuFlyouts/MailOperationMenuFlyoutItem.cs b/Wino.Mail/MenuFlyouts/MailOperationMenuFlyoutItem.cs index 51c1953b..fef8777f 100644 --- a/Wino.Mail/MenuFlyouts/MailOperationMenuFlyoutItem.cs +++ b/Wino.Mail/MenuFlyouts/MailOperationMenuFlyoutItem.cs @@ -1,5 +1,5 @@ using System; -using Wino.Core.Domain.Models.Menus; +using Wino.Domain.Models.Menus; namespace Wino.MenuFlyouts.Context { diff --git a/Wino.Mail/MenuFlyouts/MoveButtonFlyout.cs b/Wino.Mail/MenuFlyouts/MoveButtonFlyout.cs index 839ca65a..66943af7 100644 --- a/Wino.Mail/MenuFlyouts/MoveButtonFlyout.cs +++ b/Wino.Mail/MenuFlyouts/MoveButtonFlyout.cs @@ -2,7 +2,8 @@ using System.Collections.Generic; using System.Linq; using Windows.Foundation; -using Wino.Core.Domain.Entities; +using Wino.Domain.Entities; + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/MenuFlyouts/RendererCommandBarItem.cs b/Wino.Mail/MenuFlyouts/RendererCommandBarItem.cs index 871236f0..0a5f7aee 100644 --- a/Wino.Mail/MenuFlyouts/RendererCommandBarItem.cs +++ b/Wino.Mail/MenuFlyouts/RendererCommandBarItem.cs @@ -1,8 +1,9 @@ using System; using Wino.Controls; -using Wino.Core.Domain.Enums; using Wino.Helpers; +using Wino.Domain.Enums; + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/MenuFlyouts/WinoOperationFlyoutItem.cs b/Wino.Mail/MenuFlyouts/WinoOperationFlyoutItem.cs index 356670f7..8cf763cf 100644 --- a/Wino.Mail/MenuFlyouts/WinoOperationFlyoutItem.cs +++ b/Wino.Mail/MenuFlyouts/WinoOperationFlyoutItem.cs @@ -1,10 +1,13 @@ using System; using Wino.Controls; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.Menus; using Wino.Helpers; +using Wino.Domain.Interfaces; +using Wino.Domain.Models.Menus; +using Wino.Domain.Models.Folders; + + + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/PartialApp.cs b/Wino.Mail/PartialApp.cs index 54b730df..7618d3f4 100644 --- a/Wino.Mail/PartialApp.cs +++ b/Wino.Mail/PartialApp.cs @@ -3,20 +3,23 @@ using System.Collections.Generic; using Microsoft.AppCenter; using Microsoft.AppCenter.Analytics; using Microsoft.AppCenter.Crashes; -using Microsoft.Extensions.DependencyInjection; + using Windows.ApplicationModel.Core; using Windows.Foundation.Metadata; using Windows.Storage; using Windows.System.Profile; using Windows.UI.ViewManagement; -using Wino.Core; -using Wino.Core.Domain.Interfaces; -using Wino.Core.UWP; using Wino.Mail.ViewModels; using Wino.Services; -using Wino.Core.Services; using Windows.ApplicationModel.AppService; -using Wino.Core.WinUI.Services; +using Microsoft.Extensions.DependencyInjection; +using Wino.Mail; +using Wino.Shared.WinRT; +using Wino.Shared.WinRT.Services; +using Wino.Domain.Interfaces; + + + @@ -57,12 +60,17 @@ namespace Wino { var services = new ServiceCollection(); - services.RegisterCoreServices(); + // Registration of the database services and non-synchronization related classes. + services.RegisterServices(); + + // Registration of shared WinRT services. services.RegisterCoreUWPServices(); - RegisterUWPServices(services); - RegisterViewModels(services); - RegisterActivationHandlers(services); + // Registration of Wino Mail services. + services.RegisterWinoMailServices(); + + // Register Wino Mail viewModels. + services.RegisterViewModels(); return services.BuildServiceProvider(); } @@ -104,58 +112,5 @@ namespace Wino } #endregion - - #region Dependency Injection - - private void RegisterActivationHandlers(IServiceCollection services) - { - //services.AddTransient(); - //services.AddTransient(); - //services.AddTransient(); - //services.AddTransient(); - } - - private void RegisterUWPServices(IServiceCollection services) - { - services.AddSingleton, ApplicationResourceManager>(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); - } - - private void RegisterViewModels(IServiceCollection services) - { - services.AddSingleton(typeof(AppShellViewModel)); - services.AddTransient(typeof(SettingsDialogViewModel)); - services.AddTransient(typeof(PersonalizationPageViewModel)); - services.AddTransient(typeof(SettingOptionsPageViewModel)); - services.AddTransient(typeof(MailListPageViewModel)); - services.AddTransient(typeof(MailRenderingPageViewModel)); - services.AddTransient(typeof(AccountManagementViewModel)); - services.AddTransient(typeof(WelcomePageViewModel)); - services.AddTransient(typeof(AboutPageViewModel)); - services.AddTransient(typeof(ComposePageViewModel)); - services.AddTransient(typeof(IdlePageViewModel)); - services.AddTransient(typeof(SettingsPageViewModel)); - services.AddTransient(typeof(NewAccountManagementPageViewModel)); - services.AddTransient(typeof(AccountDetailsPageViewModel)); - services.AddTransient(typeof(SignatureManagementPageViewModel)); - services.AddTransient(typeof(MessageListPageViewModel)); - services.AddTransient(typeof(ReadingPanePageViewModel)); - services.AddTransient(typeof(MergedAccountDetailsPageViewModel)); - services.AddTransient(typeof(LanguageTimePageViewModel)); - } - - #endregion - - //private IEnumerable GetActivationHandlers() - //{ - // yield return Services.GetService(); - // yield return Services.GetService(); - // yield return Services.GetService(); - // yield return Services.GetService(); - //} } } diff --git a/Wino.Mail/Selectors/AppThemePreviewTemplateSelector.cs b/Wino.Mail/Selectors/AppThemePreviewTemplateSelector.cs index d91f5bab..2a4e8b9f 100644 --- a/Wino.Mail/Selectors/AppThemePreviewTemplateSelector.cs +++ b/Wino.Mail/Selectors/AppThemePreviewTemplateSelector.cs @@ -1,5 +1,6 @@ - -using Wino.Core.UWP.Models.Personalization; +using Wino.Shared.WinRT.Models.Personalization; + + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Selectors/FileAttachmentTypeSelector.cs b/Wino.Mail/Selectors/FileAttachmentTypeSelector.cs index d6e39701..4faa7f0e 100644 --- a/Wino.Mail/Selectors/FileAttachmentTypeSelector.cs +++ b/Wino.Mail/Selectors/FileAttachmentTypeSelector.cs @@ -1,4 +1,5 @@ -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Selectors/MailItemDisplayModePreviewTemplateSelector.cs b/Wino.Mail/Selectors/MailItemDisplayModePreviewTemplateSelector.cs index 23242f85..801f3c0d 100644 --- a/Wino.Mail/Selectors/MailItemDisplayModePreviewTemplateSelector.cs +++ b/Wino.Mail/Selectors/MailItemDisplayModePreviewTemplateSelector.cs @@ -1,5 +1,5 @@ - -using Wino.Core.Domain.Enums; +using Wino.Domain.Enums; + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Selectors/NavigationMenuTemplateSelector.cs b/Wino.Mail/Selectors/NavigationMenuTemplateSelector.cs index f4333148..7a6bdcc1 100644 --- a/Wino.Mail/Selectors/NavigationMenuTemplateSelector.cs +++ b/Wino.Mail/Selectors/NavigationMenuTemplateSelector.cs @@ -1,5 +1,8 @@ - -using Wino.Core.MenuItems; +using Wino.Mail.ViewModels.Data.MenuItems; +using Wino.Domain.Enums; + + + #if NET8_0 using Microsoft.UI.Xaml; @@ -54,7 +57,7 @@ namespace Wino.Selectors else if (item is FolderMenuItem) return FolderMenuTemplate; else if (item is FixAccountIssuesMenuItem fixAccountIssuesMenuItem) - return fixAccountIssuesMenuItem.Account.AttentionReason == Core.Domain.Enums.AccountAttentionReason.MissingSystemFolderConfiguration + return fixAccountIssuesMenuItem.Account.AttentionReason == AccountAttentionReason.MissingSystemFolderConfiguration ? FixMissingFolderConfigTemplate : FixAuthenticationIssueTemplate; else { diff --git a/Wino.Mail/Selectors/RendererCommandBarItemTemplateSelector.cs b/Wino.Mail/Selectors/RendererCommandBarItemTemplateSelector.cs index b33da861..0bd50b00 100644 --- a/Wino.Mail/Selectors/RendererCommandBarItemTemplateSelector.cs +++ b/Wino.Mail/Selectors/RendererCommandBarItemTemplateSelector.cs @@ -1,5 +1,7 @@ -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Models.Menus; +using Wino.Domain.Models.Menus; +using Wino.Domain.Enums; + + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Services/ApplicationResourceManager.cs b/Wino.Mail/Services/ApplicationResourceManager.cs index 77b8584b..3a7e66b7 100644 --- a/Wino.Mail/Services/ApplicationResourceManager.cs +++ b/Wino.Mail/Services/ApplicationResourceManager.cs @@ -1,5 +1,6 @@ using System.Linq; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; + #if NET8_0 using Microsoft.UI.Xaml; diff --git a/Wino.Mail/Services/DialogService.cs b/Wino.Mail/Services/DialogService.cs index 694d08ae..ca29ce9b 100644 --- a/Wino.Mail/Services/DialogService.cs +++ b/Wino.Mail/Services/DialogService.cs @@ -7,21 +7,32 @@ using CommunityToolkit.Mvvm.Messaging; using Serilog; using Windows.Storage; using Windows.Storage.Pickers; -using Wino.Core.Domain; -using Wino.Core.Domain.Entities; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.Accounts; -using Wino.Core.Domain.Models.Folders; -using Wino.Core.Domain.Models.Synchronization; -using Wino.Core.Messages.Shell; -using Wino.Core.Messages.Synchronization; -using Wino.Core.UWP.Extensions; +using Wino.Domain; +using Wino.Domain.Models.Synchronization; using Wino.Dialogs; using Wino.Helpers; -using Wino.Core.WinUI.Services; using Wino.Messaging.Server; using Windows.Foundation.Metadata; +using Wino.Messaging.Client.Shell; +using Wino.Messaging.Client.Synchronization; +using Wino.Shared.WinRT.Extensions; +using Wino.Shared.WinRT.Services; +using Wino.Domain.Models.Accounts; +using Wino.Domain.Enums; +using Wino.Domain.Models.Folders; +using Wino.Domain.Entities; +using Wino.Domain.Interfaces; + + + + + + + + + + + diff --git a/Wino.Mail/Services/LaunchProtocolService.cs b/Wino.Mail/Services/LaunchProtocolService.cs index ff22b45f..93a5dd5b 100644 --- a/Wino.Mail/Services/LaunchProtocolService.cs +++ b/Wino.Mail/Services/LaunchProtocolService.cs @@ -1,5 +1,5 @@ using System.Collections.Specialized; -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; namespace Wino.Services { diff --git a/Wino.Mail/Services/ToastActivationService.cs b/Wino.Mail/Services/ToastActivationService.cs index 57eaaf05..1569238f 100644 --- a/Wino.Mail/Services/ToastActivationService.cs +++ b/Wino.Mail/Services/ToastActivationService.cs @@ -1,4 +1,4 @@ -using Wino.Core.Domain.Interfaces; +using Wino.Domain.Interfaces; namespace Wino.Services { diff --git a/Wino.Mail/Services/WinoNavigationService.cs b/Wino.Mail/Services/WinoNavigationService.cs index e940289e..7186aeb2 100644 --- a/Wino.Mail/Services/WinoNavigationService.cs +++ b/Wino.Mail/Services/WinoNavigationService.cs @@ -1,17 +1,23 @@ using System; using System.Linq; using CommunityToolkit.Mvvm.Messaging; -using Wino.Core.Domain.Enums; -using Wino.Core.Domain.Interfaces; -using Wino.Core.Domain.Models.MailItem; -using Wino.Core.Domain.Models.Navigation; using Wino.Helpers; using Wino.Mail.ViewModels.Data; using Wino.Mail.ViewModels.Messages; using Wino.Views; using Wino.Views.Account; using Wino.Views.Settings; -using Wino.Core.WinUI.Services; +using Wino.Shared.WinRT.Services; +using Wino.Domain.Models.Navigation; +using Wino.Domain.Enums; +using Wino.Domain.Models.MailItem; +using Wino.Domain.Interfaces; + + + + + + #if NET8_0 diff --git a/Wino.Mail/Styles/CommandBarItems.xaml b/Wino.Mail/Styles/CommandBarItems.xaml index dd596d20..e41f7455 100644 --- a/Wino.Mail/Styles/CommandBarItems.xaml +++ b/Wino.Mail/Styles/CommandBarItems.xaml @@ -1,7 +1,7 @@  diff --git a/Wino.Mail/Styles/ItemContainerStyles.xaml b/Wino.Mail/Styles/ItemContainerStyles.xaml index fc1c72c9..a5e72f3a 100644 --- a/Wino.Mail/Styles/ItemContainerStyles.xaml +++ b/Wino.Mail/Styles/ItemContainerStyles.xaml @@ -14,7 +14,7 @@ #ecf0f1 - +