Skip to content

Commit

Permalink
change to RegisterForRegionNavigation - fixes #2166
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Aug 20, 2020
1 parent d9f8368 commit b83ffd4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions e2e/Forms/src/HelloRegions/RegionDemoModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public void RegisterTypes(IContainerRegistry containerRegistry)
containerRegistry.RegisterForNavigation<ScrollViewDemoRegion, ScrollViewDemoRegionViewModel>();
containerRegistry.RegisterForNavigation<StackLayoutDemoRegion, StackLayoutDemoRegionViewModel>();

containerRegistry.RegisterForNavigation<RegionA, RegionAViewModel>();
containerRegistry.RegisterForNavigation<RegionB, RegionBViewModel>();
containerRegistry.RegisterForNavigation<RegionC, RegionCViewModel>();
containerRegistry.RegisterForRegionNavigation<RegionA, RegionAViewModel>();
containerRegistry.RegisterForRegionNavigation<RegionB, RegionBViewModel>();
containerRegistry.RegisterForRegionNavigation<RegionC, RegionCViewModel>();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public static class RegionNavigationRegistrationExtensions
/// </summary>
/// <typeparam name="TView">The Type of <see cref="View"/> to register</typeparam>
/// <param name="containerRegistry"><see cref="IContainerRegistry"/> used to register type for Navigation.</param>
/// <param name="name">The unique name to register with the Page</param>
public static void RegisterForNavigation<TView>(this IContainerRegistry containerRegistry, string name = null)
/// <param name="name">The unique name to register with the View</param>
public static void RegisterForRegionNavigation<TView>(this IContainerRegistry containerRegistry, string name = null)
where TView : View
{
var viewType = typeof(TView);
Expand All @@ -30,10 +30,10 @@ public static void RegisterForNavigation<TView>(this IContainerRegistry containe
/// Registers a <see cref="View"/> for region navigation.
/// </summary>
/// <typeparam name="TView">The Type of <see cref="View" to register</typeparam>
/// <typeparam name="TViewModel">The ViewModel to use as the BindingContext for the Page</typeparam>
/// <param name="name">The unique name to register with the Page</param>
/// <typeparam name="TViewModel">The ViewModel to use as the BindingContext for the View</typeparam>
/// <param name="name">The unique name to register with the View</param>
/// <param name="containerRegistry"></param>
public static void RegisterForNavigation<TView, TViewModel>(this IContainerRegistry containerRegistry, string name = null)
public static void RegisterForRegionNavigation<TView, TViewModel>(this IContainerRegistry containerRegistry, string name = null)
where TView : View
where TViewModel : class
{
Expand Down

0 comments on commit b83ffd4

Please sign in to comment.