LibraStack / UnityMvvmToolkit

Brings data-binding to your Unity project
MIT License
469 stars 27 forks source link

Some nested members are not properly retrieved #66

Open Hellfim opened 1 year ago

Hellfim commented 1 year ago

Private/protected members declared in inherited classes are not always properly retrieved. Suppose we have following structure of ViewModels

public class BaseViewModel { }

public class MiddleViewModel : BaseViewModel
{
    [Observable("MyTestInt")]
    private IProperty<Int32> _myTestInt;

    public MiddleClass()
    {
        _myTestInt = new Property<Int32>(123);
    }
}

public class TopLevelViewModel : MiddleViewModel
{
}

If one were to try bind TopLevelViewModel's MyTestInt from it's parent class, then exception InvalidOperationException: Property 'MyTestInt' not found. would be raised.