Files
Toolkit2/Toolkit.Foundation/NavigationRegionProvider.cs
T
TheXamlGuy b155f5c6e2 wip
2024-06-12 23:04:22 +01:00

24 lines
569 B
C#

namespace Toolkit.Foundation;
public class NavigationRegionProvider(INavigationRegionCollection collection) :
INavigationRegionProvider
{
public object? Get(object key) =>
collection.TryGetValue(key, out object? target) ? target : default;
public bool TryGet(object name,
out object? value)
{
if (collection.TryGetValue(name,
out object? target))
{
value = target;
return true;
}
else
{
value = null;
return false;
}
}
}