lbugnion / mvvmlight

The main purpose of the toolkit is to accelerate the creation and development of MVVM applications in Xamarin.Android, Xamarin.iOS, Xamarin.Forms, Windows 10 UWP, Windows Presentation Foundation (WPF), Silverlight, Windows Phone.
http://www.mvvmlight.net
MIT License
1.16k stars 312 forks source link

MvvmLight 5.4.1.1 source code #90

Open jozefizso opened 4 years ago

jozefizso commented 4 years ago

We use the MvvmLight v5.4.1.1 package in our project.

We have this call path in the stacktrace and we are unable to match it to the source code:

   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at GalaSoft.MvvmLight.Helpers.WeakAction`1.Execute(T parameter) in C:\Users\lbugn\Documents\MVVMLight\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\Helpers\WeakActionGeneric.cs:line 226
   at GalaSoft.MvvmLight.Helpers.WeakAction`1.ExecuteWithObject(Object parameter) in C:\Users\lbugn\Documents\MVVMLight\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\Helpers\WeakActionGeneric.cs:line 259
   at GalaSoft.MvvmLight.Messaging.Messenger.SendToList[TMessage](TMessage message, IEnumerable`1 weakActionsAndTokens, Type messageTargetType, Object token) in C:\Users\lbugn\Documents\MVVMLight\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\Messaging\Messenger.cs:line 518
   at GalaSoft.MvvmLight.Messaging.Messenger.SendToTargetOrType[TMessage](TMessage message, Type messageTargetType, Object token) in C:\Users\lbugn\Documents\MVVMLight\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\Messaging\Messenger.cs:line 713
   at GalaSoft.MvvmLight.Messaging.Messenger.Send[TMessage](TMessage message) in C:\Users\lbugn\Documents\MVVMLight\GalaSoft.MvvmLight\GalaSoft.MvvmLight (PCL)\Messaging\Messenger.cs:line 295

This stacktrace reports the method Execute() called Invoke() on line 226 in the WeakActionGeneric.cs file. In the master code, line 226 contains if (Method != null only and I cannot find the correct source code in other branches

https://github.com/lbugnion/mvvmlight/blob/master/GalaSoft.MvvmLight/GalaSoft.MvvmLight%20(PCL)/Helpers/WeakActionGeneric.cs#L226

Which version of the code was the 5.4.1.1 library built with?

jozefizso commented 4 years ago

WeakActionGeneric.cs file was last updated on Oct 8, 2017 and the 5.4.1.1 library is from Sep 2018 - that's why I'm struggling with find the right source code for it.