File tree Expand file tree Collapse file tree 6 files changed +8
-15
lines changed
Expand file tree Collapse file tree 6 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 1- using System . Diagnostics . CodeAnalysis ;
2-
3- namespace CommunityToolkit . Maui . Markup . Sample . Pages ;
1+ namespace CommunityToolkit . Maui . Markup . Sample . Pages ;
42
53sealed partial class NewsPage : BaseContentPage < NewsViewModel >
64{
75 readonly IDispatcher dispatcher ;
86 readonly RefreshView refreshView ;
9-
7+
108 public NewsPage ( IDispatcher dispatcher ,
119 NewsViewModel newsViewModel ) : base ( newsViewModel , "Top Stories" )
1210 {
@@ -47,7 +45,7 @@ protected override void OnAppearing()
4745
4846 static bool IsNullOrEmpty ( in IEnumerable ? enumerable ) => ! enumerable ? . GetEnumerator ( ) . MoveNext ( ) ?? true ;
4947 }
50-
48+
5149 async void HandleSelectionChanged ( object ? sender , SelectionChangedEventArgs e )
5250 {
5351 ArgumentNullException . ThrowIfNull ( sender ) ;
@@ -83,13 +81,13 @@ bool TryRefreshCollectionView()
8381 }
8482
8583 void HandleNumberOfTopStoriesToFetchChanged ( object ? sender , int e ) => TryRefreshCollectionView ( ) ;
86-
84+
8785 Task NavigateToSettingsPage ( ) => dispatcher . DispatchAsync ( ( ) =>
8886 {
8987 var route = AppShell . GetRoute < SettingsPage , SettingsViewModel > ( ) ;
9088 return Shell . Current . GoToAsync ( route ) ;
9189 } ) ;
92-
90+
9391 Task NavigateToNewsDetailPage ( StoryModel storyModel ) => dispatcher . DispatchAsync ( ( ) =>
9492 {
9593 var route = AppShell . GetRoute < NewsDetailPage , NewsDetailViewModel > ( ) ;
Original file line number Diff line number Diff line change 1- using System . Diagnostics . CodeAnalysis ;
2- using Microsoft . Maui . Layouts ;
1+ using Microsoft . Maui . Layouts ;
32
43namespace CommunityToolkit . Maui . Markup . Sample . Pages ;
54
Original file line number Diff line number Diff line change 1- using System . Diagnostics . CodeAnalysis ;
2- using Foundation ;
1+ using Foundation ;
32namespace CommunityToolkit . Maui . Markup . Sample ;
43
54[ Register ( nameof ( AppDelegate ) ) ]
Original file line number Diff line number Diff line change 11using System . Windows . Input ;
2- using BindableObjectViews ;
32using CommunityToolkit . Maui . Markup . UnitTests . Base ;
43using NUnit . Framework ;
54namespace CommunityToolkit . Maui . Markup . UnitTests
@@ -746,7 +745,7 @@ public void SupportDerivedElements()
746745 . Invoke ( l => l . Text = nameof ( SupportDerivedElements ) )
747746 . Assign ( out DerivedFromLabel assignDerivedFromLabel ) ,
748747 Is . InstanceOf < DerivedFromLabel > ( ) ) ;
749-
748+
750749 Assert . That ( assignDerivedFromLabel , Is . InstanceOf < DerivedFromLabel > ( ) ) ;
751750 } ) ;
752751 }
Original file line number Diff line number Diff line change 11using CommunityToolkit . Maui . Markup . UnitTests . Base ;
2- using CommunityToolkit . Maui . Markup . UnitTests . Mocks ;
32using NUnit . Framework ;
43namespace CommunityToolkit . Maui . Markup . UnitTests ;
54
Original file line number Diff line number Diff line change 11using CommunityToolkit . Maui . Markup . UnitTests . Base ;
2- using CommunityToolkit . Maui . Markup . UnitTests . Mocks ;
32using NUnit . Framework ;
43namespace CommunityToolkit . Maui . Markup . UnitTests ;
54
You can’t perform that action at this time.
0 commit comments