diff --git a/Src/AsyncAwaitBestPractices.MVVM.nuspec b/Src/AsyncAwaitBestPractices.MVVM.nuspec index 2682d2a..dd75eba 100644 --- a/Src/AsyncAwaitBestPractices.MVVM.nuspec +++ b/Src/AsyncAwaitBestPractices.MVVM.nuspec @@ -2,7 +2,7 @@ AsyncAwaitBestPractices.MVVM - 3.0.0-pre2 + 3.0.0-pre3 Task Extensions for MVVM Brandon Minnick, John Thiriet Brandon Minnick @@ -14,7 +14,7 @@ Includes AsyncCommand and IAsyncCommand which allows ICommand to safely be used asynchronously with Task. task,fire and forget, threading, extensions, system.threading.tasks,async,await - + New In This Release: @@ -22,6 +22,7 @@ - Added support for `.SafeFireAndForget<TException>()` - Added `SafeFireAndForgetExtensions.SetDefaultExceptionHandling(Action<Exception> onException)` to set a default action for every call to `SafeFireAndForget` - Added `SafeFireAndForgetExtensions.Initialize(bool shouldAlwaysRethrowException = false)`. When set to `true` will rethrow every exception caught by `SafeFireAndForget`. Warning: `SafeFireAndForgetExtensions.Initialize(true)` is only recommended for DEBUG environments. + - Added support for `Exception innerException` to `InvalidCommandParameterException` - Breaking Change: Changed default value to `continueOnCapturedContext = false`. This improves performance by not requiring a context switch when `.SafeFireAndForget()` and `IAsyncCommand` have completed. Copyright (c) 2018 Brandon Minnick diff --git a/Src/AsyncAwaitBestPractices.MVVM/InvalidCommandParameterException.cs b/Src/AsyncAwaitBestPractices.MVVM/InvalidCommandParameterException.cs index 14248ce..7e33fbe 100644 --- a/Src/AsyncAwaitBestPractices.MVVM/InvalidCommandParameterException.cs +++ b/Src/AsyncAwaitBestPractices.MVVM/InvalidCommandParameterException.cs @@ -12,7 +12,28 @@ public class InvalidCommandParameterException : Exception /// /// Excpected parameter type for AsyncCommand.Execute. /// Actual parameter type for AsyncCommand.Execute. - public InvalidCommandParameterException(Type excpectedType, Type actualType) : base(CreateErrorMessage(excpectedType, actualType)) + /// Inner Exception + public InvalidCommandParameterException(Type excpectedType, Type actualType, Exception innerException) : this(CreateErrorMessage(excpectedType, actualType), innerException) + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// Excpected parameter type for AsyncCommand.Execute. + /// Actual parameter type for AsyncCommand.Execute. + public InvalidCommandParameterException(Type excpectedType, Type actualType) : this(CreateErrorMessage(excpectedType, actualType)) + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// Exception Message + /// Inner Exception + public InvalidCommandParameterException(string message, Exception innerException) : base(message, innerException) { } diff --git a/Src/AsyncAwaitBestPractices.nuspec b/Src/AsyncAwaitBestPractices.nuspec index 30f0e8d..ab6f320 100644 --- a/Src/AsyncAwaitBestPractices.nuspec +++ b/Src/AsyncAwaitBestPractices.nuspec @@ -2,7 +2,7 @@ AsyncAwaitBestPractices - 3.0.0-pre2 + 3.0.0-pre3 Task Extensions for System.Threading.Tasks Brandon Minnick, John Thiriet Brandon Minnick diff --git a/Src/AsyncAwaitBestPractices/WeakEventManager/WeakEventManager.cs b/Src/AsyncAwaitBestPractices/WeakEventManager/WeakEventManager.cs index 5d98ab8..8fc7a7e 100644 --- a/Src/AsyncAwaitBestPractices/WeakEventManager/WeakEventManager.cs +++ b/Src/AsyncAwaitBestPractices/WeakEventManager/WeakEventManager.cs @@ -80,7 +80,7 @@ public void RemoveEventHandler(Action action, [CallerMemberName] str } /// - /// Executes the event EventHandler + /// Executes the event EventHandler /// /// Sender /// Event arguments @@ -89,7 +89,7 @@ public void HandleEvent(object sender, TEventArgs eventArgs, string eventName) = EventManagerService.HandleEvent(eventName, sender, eventArgs, _eventHandlers); /// - /// Executes the event Action + /// Executes the event Action /// /// Event arguments /// Event name