kswoll / ReactiveUI.Fody

C# Fody extension to generate RaisePropertyChange notifications for properties and ObservableAsPropertyHelper properties.
MIT License
154 stars 31 forks source link

ObservableAsProperty no longer works with ReactiveUI 6.5.0 #4

Closed bradtwurst closed 9 years ago

bradtwurst commented 9 years ago

ReactiveUI updated to 6.5.0 recently.

This change is causing the following exception...

Error   3   Fody/ReactiveUI: An unhandled exception occurred:
Exception: Sequence contains more than one matching element
StackTrace:
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
   at ReactiveUI.Fody.ReactiveUIPropertyWeaver.Execute() in     c:\Dev\ReactiveUI.Fody\ReactiveUI.Fody\ReactiveUIPropertyWeaver.cs:line 27
   at ReactiveUI.Fody.ModuleWeaver.Execute() in     c:\Dev\ReactiveUI.Fody\ReactiveUI.Fody\ModuleWeaver.cs:line 24
   at lambda_method(Closure , Object )
   at InnerWeaver.Execute() in     c:\TeamCity\buildAgent\work\7495521761d392b9\FodyIsolated\InnerWeaver.cs:line 50
Source:
System.Core
TargetSite:
TSource Single[TSource](System.Collections.Generic.IEnumerable`1[TSource],     System.Func`2[TSource,System.Boolean])
    SalesBudgets

This can be seen in the Fody/FodyAddinSamples project by upgrading to ReactiveUI 6.5.0

kswoll commented 9 years ago

Thanks for the report! Sorry for the regression, I'll take a look at this tonight.

bradtwurst commented 9 years ago

I've created a pull request #5 - not sure if this is how you want to solve it, but it did work.