reactivemarbles / PropertyChanged

A lightweight property changed/binding framework. This is a incubator which is focused on fast binding and property changes.
MIT License
61 stars 9 forks source link

SourceGenerator breaks build ? #320

Open softlion opened 6 months ago

softlion commented 6 months ago

I switched from the reactivemarble's propertychanged to the source generator version.
But now i'm getting this build error:

D:\MyApp\ReactiveMarbles.PropertyChanged.SourceGenerator\ReactiveMarbles.Proper
tyChanged.SourceGenerator.Generator\PropertyChanged.SourceGenerator.Extensions.cs(270,28): 

error CS0122: 'ObservableCollection<MyClass>.PropertyChanged' is inaccessible due to its protection level [D:\MyApp\MyApp.csproj::TargetFramework=net8.0-ios]

Any clue ?

softlion commented 6 months ago

I found what was causing the issue. It's when an object of that class is used for WhenChanged(...)

public class GroupViewModel : ObservableCollection<MyViewModel>

That is because PropertyChanged is protected inside ObservableCollection.