Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ public static class RegionNavigationRegistrationExtensions
where TViewModel : class =>
containerRegistry.RegisterForNavigationWithViewModel(typeof(TView), typeof(TViewModel), name);

public static IContainerRegistry RegisterForNavigationWithViewModel(this IContainerRegistry containerRegistry, Type viewType, Type viewModelType, string name)
public static IContainerRegistry RegisterForRegionNavigation(this IContainerRegistry containerRegistry, Type viewType, Type viewModelType, string name = null)
=> containerRegistry.RegisterForNavigationWithViewModel(viewType, viewModelType, name);

private static IContainerRegistry RegisterForNavigationWithViewModel(this IContainerRegistry containerRegistry, Type viewType, Type viewModelType, string name)
{
if (string.IsNullOrWhiteSpace(name))
name = viewType.Name;
Expand Down Expand Up @@ -77,6 +80,9 @@ public static IContainerRegistry RegisterForNavigationWithViewModel(this IContai
where TViewModel : class =>
services.RegisterForNavigationWithViewModel(typeof(TView), typeof(TViewModel), name);

public static IServiceCollection RegisterForRegionNavigation(this IServiceCollection services, Type viewType, Type viewModelType, string name = null)
=> services.RegisterForNavigationWithViewModel(viewType, viewModelType, name);

private static IServiceCollection RegisterForNavigationWithViewModel(this IServiceCollection services, Type viewType, Type viewModelType, string name)
{
if (string.IsNullOrWhiteSpace(name))
Expand Down