Class RegionManagerExtensions
- Namespace
- Acuit.Pinpoint.Workstation.Windows
- Assembly
- Acuit.Pinpoint.Workstation.Abstractions.dll
Extensions for IRegionManager.
public static class RegionManagerExtensions
- Inheritance
-
RegionManagerExtensions
- Inherited Members
Methods
NavigateToViewInRegion(IRegionManager, string, Type, IReadOnlyDictionary<string, object?>?)
Navigates to a view within a region.
public static void NavigateToViewInRegion(this IRegionManager regionManager, string regionName, Type viewType, IReadOnlyDictionary<string, object?>? navigationParameters = null)
Parameters
regionManagerIRegionManagerregionNamestringThe region name.
viewTypeTypeThe type of the view. The view will be created via CreateInstance(IServiceProvider, Type, params object[]).
navigationParametersIReadOnlyDictionary<string, object>Optional navigation parameters.
Remarks
See the remarks for IRegionManager for details about view lifetimes and view disposal.
Exceptions
- ArgumentNullException
regionNameis null.- ArgumentNullException
viewTypeis null.- InvalidOperationException
A container for region name
regionNamehas not been registered.- InvalidOperationException
The region cannot be used for navigation because one or more views are registered for it.
- InvalidOperationException
The view factory returned null because
viewTypeis a Nullable<T>.
NavigateToViewInRegion(IRegionManager, string, Type, IServiceProvider, IReadOnlyDictionary<string, object?>?)
Navigates to a view within a region.
public static void NavigateToViewInRegion(this IRegionManager regionManager, string regionName, Type viewType, IServiceProvider serviceProvider, IReadOnlyDictionary<string, object?>? navigationParameters = null)
Parameters
regionManagerIRegionManagerregionNamestringThe region name.
viewTypeTypeThe type of the view. The view will be created via CreateInstance(IServiceProvider, Type, params object[]).
serviceProviderIServiceProviderThe service provider to use to resolve dependencies when creating the view instance.
navigationParametersIReadOnlyDictionary<string, object>Optional navigation parameters.
Remarks
See the remarks for IRegionManager for details about view lifetimes and view disposal.
Exceptions
- ArgumentNullException
regionNameis null.- ArgumentNullException
viewTypeis null.- ArgumentNullException
serviceProvideris null.- InvalidOperationException
A container for region name
regionNamehas not been registered.- InvalidOperationException
The region cannot be used for navigation because one or more views are registered for it.
- InvalidOperationException
The view factory returned null because
viewTypeis a Nullable<T>.
NavigateToViewInRegion<TView>(IRegionManager, string, IReadOnlyDictionary<string, object?>?)
Navigates to a view within a region.
public static void NavigateToViewInRegion<TView>(this IRegionManager regionManager, string regionName, IReadOnlyDictionary<string, object?>? navigationParameters = null) where TView : notnull
Parameters
regionManagerIRegionManagerregionNamestringThe region name.
navigationParametersIReadOnlyDictionary<string, object>Optional navigation parameters.
Type Parameters
TViewThe type of the view. The view will be created via CreateInstance(IServiceProvider, Type, params object[]).
Remarks
See the remarks for IRegionManager for details about view lifetimes and view disposal.
Exceptions
- ArgumentNullException
regionNameis null.- InvalidOperationException
A container for region name
regionNamehas not been registered.- InvalidOperationException
The region cannot be used for navigation because one or more views are registered for it.
- InvalidOperationException
The view factory returned null because
TViewis a Nullable<T>.
NavigateToViewInRegion<TView>(IRegionManager, string, IServiceProvider, IReadOnlyDictionary<string, object?>?)
Navigates to a view within a region.
public static void NavigateToViewInRegion<TView>(this IRegionManager regionManager, string regionName, IServiceProvider serviceProvider, IReadOnlyDictionary<string, object?>? navigationParameters = null) where TView : notnull
Parameters
regionManagerIRegionManagerregionNamestringThe region name.
serviceProviderIServiceProviderThe service provider to use to resolve dependencies when creating the view instance.
navigationParametersIReadOnlyDictionary<string, object>Optional navigation parameters.
Type Parameters
TViewThe type of the view. The view will be created via CreateInstance(IServiceProvider, Type, params object[]).
Remarks
See the remarks for IRegionManager for details about view lifetimes and view disposal.
Exceptions
- ArgumentNullException
regionNameis null.- ArgumentNullException
serviceProvideris null.- InvalidOperationException
A container for region name
regionNamehas not been registered.- InvalidOperationException
The region cannot be used for navigation because one or more views are registered for it.
- InvalidOperationException
The view factory returned null because
TViewis a Nullable<T>.
RegisterViewWithRegion(IRegionManager, string, Type)
Registers a view with a region by view type.
public static IDisposable RegisterViewWithRegion(this IRegionManager regionManager, string regionName, Type viewType)
Parameters
regionManagerIRegionManagerregionNamestringThe region name.
viewTypeTypeThe type of the view. When the view is realized, an instance of this type will be created via CreateInstance(IServiceProvider, Type, params object[]). If the type has a ViewSortHintAttribute, it will be used as the sort hint for the view in the region.
Returns
- IDisposable
An IDisposable that can be used to remove the view registration.
Remarks
See the remarks for IRegionManager for details about view lifetimes and view disposal.
Exceptions
- ArgumentNullException
regionNameis null.- ArgumentNullException
viewTypeis null.- InvalidOperationException
Views cannot be registered for the region because it is being used for navigation.
- InvalidOperationException
The container registered for the region allows only a single view, but multiple views have been registered for the region.
- InvalidOperationException
The view factory returned null because
viewTypeis a Nullable<T>.
RegisterViewWithRegion(IRegionManager, string, Type, IServiceProvider)
Registers a view with a region by view type.
public static IDisposable RegisterViewWithRegion(this IRegionManager regionManager, string regionName, Type viewType, IServiceProvider serviceProvider)
Parameters
regionManagerIRegionManagerregionNamestringThe region name.
viewTypeTypeThe type of the view. When the view is realized, an instance of this type will be created via CreateInstance(IServiceProvider, Type, params object[]). If the type has a ViewSortHintAttribute, it will be used as the sort hint for the view in the region.
serviceProviderIServiceProviderThe service provider to use to resolve dependencies when creating the view instance.
Returns
- IDisposable
An IDisposable that can be used to remove the view registration.
Remarks
See the remarks for IRegionManager for details about view lifetimes and view disposal.
Exceptions
- ArgumentNullException
regionNameis null.- ArgumentNullException
viewTypeis null.- ArgumentNullException
serviceProvideris null.- InvalidOperationException
Views cannot be registered for the region because it is being used for navigation.
- InvalidOperationException
The container registered for the region allows only a single view, but multiple views have been registered for the region.
- InvalidOperationException
The view factory returned null because
viewTypeis a Nullable<T>.
RegisterViewWithRegion<TView>(IRegionManager, string)
Registers a view with a region by view type.
public static IDisposable RegisterViewWithRegion<TView>(this IRegionManager regionManager, string regionName) where TView : notnull
Parameters
regionManagerIRegionManagerregionNamestringThe region name.
Returns
- IDisposable
An IDisposable that can be used to remove the view registration.
Type Parameters
TViewThe type of the view. When the view is realized, an instance of this type will be created via CreateInstance(IServiceProvider, Type, params object[]). If the type has a ViewSortHintAttribute, it will be used as the sort hint for the view in the region.
Remarks
See the remarks for IRegionManager for details about view lifetimes and view disposal.
Exceptions
- ArgumentNullException
regionNameis null.- InvalidOperationException
Views cannot be registered for the region because it is being used for navigation.
- InvalidOperationException
The container registered for the region allows only a single view, but multiple views have been registered for the region.
- InvalidOperationException
The view factory returned null because
TViewis a Nullable<T>.
RegisterViewWithRegion<TView>(IRegionManager, string, IServiceProvider)
Registers a view with a region by view type.
public static IDisposable RegisterViewWithRegion<TView>(this IRegionManager regionManager, string regionName, IServiceProvider serviceProvider) where TView : notnull
Parameters
regionManagerIRegionManagerregionNamestringThe region name.
serviceProviderIServiceProviderThe service provider to use to resolve dependencies when creating the view instance.
Returns
- IDisposable
An IDisposable that can be used to remove the view registration.
Type Parameters
TViewThe type of the view. When the view is realized, an instance of this type will be created via CreateInstance(IServiceProvider, Type, params object[]). If the type has a ViewSortHintAttribute, it will be used as the sort hint for the view in the region.
Remarks
See the remarks for IRegionManager for details about view lifetimes and view disposal.
Exceptions
- ArgumentNullException
regionNameis null.- ArgumentNullException
serviceProvideris null.- InvalidOperationException
Views cannot be registered for the region because it is being used for navigation.
- InvalidOperationException
The container registered for the region allows only a single view, but multiple views have been registered for the region.
- InvalidOperationException
The view factory returned null because
TViewis a Nullable<T>.