diff --git a/src/Forms/Prism.Forms/Navigation/PageNavigationInfo.cs b/src/Forms/Prism.Forms/Navigation/PageNavigationInfo.cs
index 3d0099e150..02b00c8b68 100644
--- a/src/Forms/Prism.Forms/Navigation/PageNavigationInfo.cs
+++ b/src/Forms/Prism.Forms/Navigation/PageNavigationInfo.cs
@@ -3,10 +3,19 @@
namespace Prism.Navigation
{
+ ///
+ /// Represents page registration information
+ ///
public class PageNavigationInfo
{
+ ///
+ /// The unique name to registered Page
+ ///
public string Name { get; set; }
+ ///
+ /// The type of the registered Page
+ ///
public Type Type { get; set; }
}
}
diff --git a/src/Forms/Prism.Forms/Navigation/PageNavigationRegistry.cs b/src/Forms/Prism.Forms/Navigation/PageNavigationRegistry.cs
index 41f56f9db8..e6df5ac7c7 100644
--- a/src/Forms/Prism.Forms/Navigation/PageNavigationRegistry.cs
+++ b/src/Forms/Prism.Forms/Navigation/PageNavigationRegistry.cs
@@ -4,10 +4,18 @@
namespace Prism.Navigation
{
+ ///
+ /// Maintains page navigation registrations.
+ ///
public static class PageNavigationRegistry
{
static Dictionary _pageRegistrationCache = new Dictionary();
+ ///
+ /// Registers a Page for navigation.
+ ///
+ /// The unique name to register with the Page.
+ /// The type of Page to registe.r
public static void Register(string name, Type pageType)
{
var info = new PageNavigationInfo
@@ -20,6 +28,11 @@ public static void Register(string name, Type pageType)
_pageRegistrationCache.Add(name, info);
}
+ ///
+ /// Gets the for a given registration name.
+ ///
+ /// The registration name.
+ /// The instance for the given name if registered, null otherwise.
public static PageNavigationInfo GetPageNavigationInfo(string name)
{
if (_pageRegistrationCache.ContainsKey(name))
@@ -28,6 +41,11 @@ public static PageNavigationInfo GetPageNavigationInfo(string name)
return null;
}
+ ///
+ /// Gets the for a given page type.
+ ///
+ /// The registration's type.
+ /// The first instance for the given type if registered, null otherwise.
public static PageNavigationInfo GetPageNavigationInfo(Type pageType)
{
foreach (var item in _pageRegistrationCache)
@@ -39,11 +57,19 @@ public static PageNavigationInfo GetPageNavigationInfo(Type pageType)
return null;
}
+ ///
+ /// Gets the type for a given registration name.
+ ///
+ /// The registration name.
+ /// The type of the registration for the given name if registered, null otherwise
public static Type GetPageType(string name)
{
return GetPageNavigationInfo(name)?.Type;
}
+ ///
+ /// Clears the page registration cache.
+ ///
[EditorBrowsable(EditorBrowsableState.Never)]
public static void ClearRegistrationCache()
{