From 5ac33aa4a358232a8e346183916d37709b188c02 Mon Sep 17 00:00:00 2001 From: Dmitry Shechtman Date: Fri, 5 May 2017 16:53:51 +0300 Subject: [PATCH] Fix TypeLoadException --- DesktopToast/ToastManager.cs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/DesktopToast/ToastManager.cs b/DesktopToast/ToastManager.cs index feb9b20..f0025ef 100644 --- a/DesktopToast/ToastManager.cs +++ b/DesktopToast/ToastManager.cs @@ -34,11 +34,7 @@ public static async Task ShowAsync(ToastRequest request) if (!request.IsToastValid) return ToastResult.Invalid; - var document = PrepareToastDocument(request); - if (document == null) - return ToastResult.Invalid; - - return await ShowBaseAsync(document, request.AppId); + return await ShowBaseAsync(request); } /// @@ -326,6 +322,20 @@ private static async Task CheckInstallShortcut(ToastRequest request) #region Toast + /// + /// Shows a toast. + /// + /// Toast request + /// Result of showing a toast + private static async Task ShowBaseAsync(ToastRequest request) + { + var document = PrepareToastDocument(request); + if (document == null) + return ToastResult.Invalid; + + return await ShowBaseAsync(document, request.AppId); + } + /// /// Shows a toast. ///