Jeremy Koritzinsky
1b2d644e48
Make tests in Avalonia.Base.UnitTests use ExpressionObserver.Create. For tests that require using invalid members or are more tedious to test with expression trees, test them in Avalonia.Markup.UnitTests with ExpressionObserverBuilder.
8 years ago
Jeremy Koritzinsky
af186e3529
Move string-based binding paths up to Avalonia.Markup. Make the LINQ Expression paths and raw ExpressionNodes (now public) the primarily supported syntax.
8 years ago
Jeremy Koritzinsky
cf8244b37a
Move current contents of Avalonia.Markup to Avalonia.Base. Move Avalonia.Markup.Xaml.Data/Parser classes to Avalonia.Markup since they're not Xaml-specific.
Use pattern-matching switch.
Fix bug from cleanup.
8 years ago
Jeremy Koritzinsky
8d8480c086
Allow indexer bindings to be at the start of a binding path.
8 years ago
Steven Kirk
7baa7dc0dd
Added GC.KeepAlive to tests.
Lots of `Avalonia.Markup.UnitTests` were failing intermittently. This is because in release mode, in a method like this:
```
[Fact]
public void SetValue_Should_Return_False_For_Missing_Object()
{
var data = new Class1();
var target = new ExpressionObserver(data, "Next.Bar");
using (target.Subscribe(_ => { }))
{
Assert.False(target.SetValue("baz"));
}
}
```
`data` can get GC'ed at any point after creating target. Added `GC.KeepAlive()` calls to prevent this.
Fixes #1035
Fixes #1036
Fixes #1037
9 years ago
Steven Kirk
11586a4d4c
Don't have async void tests.
That's bad. Also un-skip binding expression tests.
9 years ago
Jeremy Koritzinsky
058e28640c
Fixed some whitespace.
9 years ago
Jeremy Koritzinsky
1dc96e4184
Added more tests.
9 years ago
Jeremy Koritzinsky
b038ed55ee
Add ability to set the value pointed to by an indexer node.
9 years ago
Steven Kirk
50b0b687cd
Moved some leak tests to LeakTests.
So they can be debugged in dotMemory.
10 years ago
Steven Kirk
2f72295657
Started refactor of ExpressionObserver.
Tying to be more "rx", but also will allow us to move forward on BindingNotification changes.
10 years ago
Steven Kirk
ac427192df
Use NotifyingBase in unit tests.
And rename NotifyingBase.SubscriptionCount ->
PropertyChangedSubscriptionCount as we also track ErrorsChanged
subscription count.
10 years ago
Steven Kirk
5be41985c3
Renamed Perspex -> Avalonia
10 years ago
Steven Kirk
93884ea063
Added test for issue 284.
Moved NotifyingBase to Perspex.UnitTests in order to do this.
10 years ago
Steven Kirk
fbe681c925
Use weak events for indexer subscriptions.
10 years ago
Steven Kirk
3d271cd020
Started implementing weak bindings.
Tests currently failing as WeakSubscriptionManager doesn't support
unsubscribing yet.
10 years ago
Jeremy Koritzinsky
8c6c1ffaea
Added unit tests for parsing floating point indexers and changed LiteralParser to support it.
10 years ago
Jeremy Koritzinsky
5ed27d36d3
Added code for listening for indexer updates via INotifyPropertyChanged.
10 years ago
Jeremy Koritzinsky
74cea95956
Can now bind to a non-IList/Array indexer (with any parameter type convertible via TypeUtilities).
10 years ago
Steven Kirk
6fd2ec36a2
Fixed directory name/namespace in tests.
To make it same as the namespace being tested.
10 years ago
Steven Kirk
b230c3b3f3
Renamed XamlBinding -> Binding
Had to also rename enclosing namespace from Binding to Data as classes
with same name as a namespace cause problems.
10 years ago
Steven Kirk
12c1127f06
Check array bounds in expression indexer.
11 years ago
Steven Kirk
43a66901fc
Remove ExpressionValue.
Use PerspexProperty.UnsetValue instead.
11 years ago
Steven Kirk
0f5af3db63
Use Sprache for parsing expressions.
Use sprache instead of Roslyn for parsing expressions. One test still failing.
11 years ago
Steven Kirk
e3b6ce4186
Add support for indexers in binding expressions.
11 years ago