Skip to content

Collect only observable fields from ViewModel. #6

Closed
@ChebanovDD

Description

@ChebanovDD

Describe the bug

Private fields are not ignored when building the ViewModel.

Code example

public class MainViewModel : IBindingContext
{
    private readonly IProperty<int> _count = new Property<int>();

    public IReadOnlyProperty<int> Count => _count;
}

Current result

Exception: "ArgumentException: An item with the same key has already been added." will be thrown.

Expected result

The _count field should be ignored if it is private or not marked with the Observable attribute.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions