Table of Contents

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

regionManager IRegionManager
regionName string

The region name.

viewType Type

The type of the view. The view will be created via CreateInstance(IServiceProvider, Type, params object[]).

navigationParameters IReadOnlyDictionary<string, object>

Optional navigation parameters.

Remarks

See the remarks for IRegionManager for details about view lifetimes and view disposal.

Exceptions

ArgumentNullException

regionName is null.

ArgumentNullException

viewType is null.

InvalidOperationException

A container for region name regionName has 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 viewType is 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

regionManager IRegionManager
regionName string

The region name.

viewType Type

The type of the view. The view will be created via CreateInstance(IServiceProvider, Type, params object[]).

serviceProvider IServiceProvider

The service provider to use to resolve dependencies when creating the view instance.

navigationParameters IReadOnlyDictionary<string, object>

Optional navigation parameters.

Remarks

See the remarks for IRegionManager for details about view lifetimes and view disposal.

Exceptions

ArgumentNullException

regionName is null.

ArgumentNullException

viewType is null.

ArgumentNullException

serviceProvider is null.

InvalidOperationException

A container for region name regionName has 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 viewType is 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

regionManager IRegionManager
regionName string

The region name.

navigationParameters IReadOnlyDictionary<string, object>

Optional navigation parameters.

Type Parameters

TView

The 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

regionName is null.

InvalidOperationException

A container for region name regionName has 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 TView is 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

regionManager IRegionManager
regionName string

The region name.

serviceProvider IServiceProvider

The service provider to use to resolve dependencies when creating the view instance.

navigationParameters IReadOnlyDictionary<string, object>

Optional navigation parameters.

Type Parameters

TView

The 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

regionName is null.

ArgumentNullException

serviceProvider is null.

InvalidOperationException

A container for region name regionName has 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 TView is 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

regionManager IRegionManager
regionName string

The region name.

viewType Type

The 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

regionName is null.

ArgumentNullException

viewType is 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 viewType is 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

regionManager IRegionManager
regionName string

The region name.

viewType Type

The 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.

serviceProvider IServiceProvider

The 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

regionName is null.

ArgumentNullException

viewType is null.

ArgumentNullException

serviceProvider is 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 viewType is 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

regionManager IRegionManager
regionName string

The region name.

Returns

IDisposable

An IDisposable that can be used to remove the view registration.

Type Parameters

TView

The 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

regionName is 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 TView is 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

regionManager IRegionManager
regionName string

The region name.

serviceProvider IServiceProvider

The 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

TView

The 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

regionName is null.

ArgumentNullException

serviceProvider is 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 TView is a Nullable<T>.