AppCenter to AppInsights migration. (#562)
* Remove AppCenter usage and libraries. * Remove redundant pacakges and add the app insights sink. * Diagnostic id support and manipulating telemetries. * Handling of appdomain unhandled exceptions. * Remove unused package identity package from mail project. * Fixing printing.
This commit is contained in:
@@ -5,9 +5,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
using Serilog;
|
||||
using Wino.Core;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
@@ -274,8 +272,7 @@ namespace Wino.Mail.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, WinoErrors.AccountCreation);
|
||||
Crashes.TrackError(ex);
|
||||
Log.Error(ex, "Failed to create account.");
|
||||
|
||||
DialogService.InfoBarMessage(Translator.Info_AccountCreationFailedTitle, ex.Message, InfoBarMessageType.Error);
|
||||
|
||||
|
||||
@@ -6,11 +6,9 @@ using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
using MoreLinq;
|
||||
using MoreLinq.Extensions;
|
||||
using Serilog;
|
||||
using Wino.Core;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
@@ -301,7 +299,7 @@ namespace Wino.Mail.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Crashes.TrackError(ex);
|
||||
Log.Error(ex, "Failed to configure background tasks.");
|
||||
|
||||
_dialogService.InfoBarMessage(Translator.Info_BackgroundExecutionUnknownErrorTitle, Translator.Info_BackgroundExecutionUnknownErrorMessage, InfoBarMessageType.Error);
|
||||
}
|
||||
@@ -373,7 +371,7 @@ namespace Wino.Mail.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, WinoErrors.StartupAccountExtendFail);
|
||||
Log.Error(ex, "Failed to process launch options.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,7 +472,7 @@ namespace Wino.Mail.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, WinoErrors.AccountNavigateInboxFail);
|
||||
Log.Error(ex, "Failed to navigate to Inbox.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,11 +10,9 @@ using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
using MoreLinq;
|
||||
using Nito.AsyncEx;
|
||||
using Serilog;
|
||||
using Wino.Core;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
@@ -844,11 +842,9 @@ namespace Wino.Mail.ViewModels
|
||||
Debugger.Break();
|
||||
|
||||
if (IsInSearchMode)
|
||||
Log.Error(ex, WinoErrors.SearchFailed);
|
||||
Log.Error(ex, "Failed to perform search.");
|
||||
else
|
||||
Log.Error(ex, WinoErrors.MailListRefreshFolder);
|
||||
|
||||
Crashes.TrackError(ex);
|
||||
Log.Error(ex, "Failed to refresh listed mails.");
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -9,10 +9,9 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using MailKit;
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
|
||||
using MimeKit;
|
||||
using Serilog;
|
||||
using Wino.Core;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Entities.Mail;
|
||||
using Wino.Core.Domain.Entities.Shared;
|
||||
@@ -345,8 +344,7 @@ namespace Wino.Mail.ViewModels
|
||||
{
|
||||
_dialogService.InfoBarMessage(Translator.Info_MailRenderingFailedTitle, string.Format(Translator.Info_MailRenderingFailedMessage, ex.Message), InfoBarMessageType.Error);
|
||||
|
||||
Crashes.TrackError(ex);
|
||||
Log.Error(ex, "Render Failed");
|
||||
Log.Error(ex, "Failed to render mail.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -616,8 +614,7 @@ namespace Wino.Mail.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, WinoErrors.OpenAttachment);
|
||||
Crashes.TrackError(ex);
|
||||
Log.Error(ex, "Failed to open attachment.");
|
||||
|
||||
_dialogService.InfoBarMessage(Translator.Info_AttachmentOpenFailedTitle, Translator.Info_AttachmentOpenFailedMessage, InfoBarMessageType.Error);
|
||||
}
|
||||
@@ -643,8 +640,7 @@ namespace Wino.Mail.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, WinoErrors.SaveAttachment);
|
||||
Crashes.TrackError(ex);
|
||||
Log.Error(ex, "Failed to save attachment.");
|
||||
|
||||
_dialogService.InfoBarMessage(Translator.Info_AttachmentSaveFailedTitle, Translator.Info_AttachmentSaveFailedMessage, InfoBarMessageType.Error);
|
||||
}
|
||||
@@ -673,8 +669,7 @@ namespace Wino.Mail.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, WinoErrors.SaveAttachment);
|
||||
Crashes.TrackError(ex);
|
||||
Log.Error(ex, "Failed to save attachment.");
|
||||
|
||||
_dialogService.InfoBarMessage(Translator.Info_AttachmentSaveFailedTitle, Translator.Info_AttachmentSaveFailedMessage, InfoBarMessageType.Error);
|
||||
}
|
||||
@@ -709,8 +704,8 @@ namespace Wino.Mail.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Failed to print mail.");
|
||||
_dialogService.InfoBarMessage(string.Empty, ex.Message, InfoBarMessageType.Error);
|
||||
Crashes.TrackError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -735,8 +730,8 @@ namespace Wino.Mail.ViewModels
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Failed to save as PDF.");
|
||||
_dialogService.InfoBarMessage(Translator.Info_PDFSaveFailedTitle, ex.Message, InfoBarMessageType.Error);
|
||||
Crashes.TrackError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -786,8 +781,7 @@ namespace Wino.Mail.ViewModels
|
||||
{
|
||||
_dialogService.InfoBarMessage(Translator.Info_MailRenderingFailedTitle, string.Format(Translator.Info_MailRenderingFailedMessage, ex.Message), InfoBarMessageType.Error);
|
||||
|
||||
Crashes.TrackError(ex);
|
||||
Log.Error(ex, "Render Failed");
|
||||
Log.Error(ex, "Failed to render mail.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EmailValidation" />
|
||||
<PackageReference Include="Microsoft.AppCenter.Crashes" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" />
|
||||
<PackageReference Include="System.Reactive" />
|
||||
<PackageReference Include="EmailValidation" />
|
||||
<PackageReference Include="Microsoft.Identity.Client" />
|
||||
<PackageReference Include="System.Reactive" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Wino.Core.Domain\Wino.Core.Domain.csproj" />
|
||||
|
||||
Reference in New Issue
Block a user