Skip to content

Update RegionNavigationRegistrationExtensions.cs#3145

Merged
dansiegel merged 1 commit intoPrismLibrary:masterfrom
jpislas:patch-1
May 22, 2024
Merged

Update RegionNavigationRegistrationExtensions.cs#3145
dansiegel merged 1 commit intoPrismLibrary:masterfrom
jpislas:patch-1

Conversation

@jpislas
Copy link
Contributor

@jpislas jpislas commented May 20, 2024

Allow for registering a view for navigation using type. This method already exists but is currently private. This is existing function so no tests created.

## Description of Change

Make existing function public.

Changed:

  • private static IContainerRegistry RegisterForRegionNavigation => public static IContainerRegistry RegisterForRegionNavigation

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard

Allow for registering a view for navigation using type. This method already exists but is currently private.
@dansiegel
Copy link
Member

@jpislas can you please give us some context on why you feel this is needed as part of the public API?

@jpislas
Copy link
Contributor Author

jpislas commented May 22, 2024

@jpislas can you please give us some context on why you feel this is needed as part of the public API?

@dansiegel I register my views using attributes/reflection and don't have access to strongly type them so I end up having to work around it. Its also the way it is set up for standard non region based navigation registration, so it would be consistent with existing functionality. For example:

            if (attribute != null)
            {
                if (attribute.UseRegionNavigation)
                    containerRegistry.RegisterForRegionNavigation(t, attribute.ViewModelType, t.Name);
                else
                    containerRegistry.RegisterForNavigation(t, attribute.ViewModelType, t.Name);
            }

@dansiegel dansiegel merged commit 17c6d31 into PrismLibrary:master May 22, 2024
@jpislas jpislas deleted the patch-1 branch May 22, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants