Show / Hide Table of Contents

Class RegionNavigationContentLoader

Implementation of IRegionNavigationContentLoader that relies on a CommonServiceLocator.IServiceLocator to create new views when necessary.

Inheritance
object
RegionNavigationContentLoader
MefRegionNavigationContentLoader
Implements
IRegionNavigationContentLoader
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Presentation.Regions
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class RegionNavigationContentLoader : IRegionNavigationContentLoader

Constructors

View Source

RegionNavigationContentLoader(IServiceLocator)

Initializes a new instance of the RegionNavigationContentLoader class with a service locator.

Declaration
public RegionNavigationContentLoader(IServiceLocator serviceLocator)
Parameters
Type Name Description
IServiceLocator serviceLocator

The service locator.

Methods

View Source

CreateNewRegionItem(string)

Provides a new item for the region based on the supplied candidate target contract name.

Declaration
protected virtual object CreateNewRegionItem(string candidateTargetContract)
Parameters
Type Name Description
string candidateTargetContract

The target contract to build.

Returns
Type Description
object

An instance of an item to put into the IRegion.

View Source

GetCandidatesFromRegion(IRegion, string)

Returns the set of candidates that may satisfy this navigation request.

Declaration
protected virtual IEnumerable<object> GetCandidatesFromRegion(IRegion region, string candidateNavigationContract)
Parameters
Type Name Description
IRegion region

The region containing items that may satisfy the navigation request.

string candidateNavigationContract

The candidate navigation target as determined by GetContractFromNavigationContext(NavigationContext)

Returns
Type Description
IEnumerable<object>

An enumerable of candidate objects from the IRegion

View Source

GetContractFromNavigationContext(NavigationContext)

Returns the candidate TargetContract based on the NavigationContext.

Declaration
protected virtual string GetContractFromNavigationContext(NavigationContext navigationContext)
Parameters
Type Name Description
NavigationContext navigationContext

The navigation contract.

Returns
Type Description
string

The candidate contract to seek within the IRegion and to use, if not found, when resolving from the container.

View Source

LoadContent(IRegion, NavigationContext)

Gets the view to which the navigation request represented by navigationContext applies.

Declaration
public object LoadContent(IRegion region, NavigationContext navigationContext)
Parameters
Type Name Description
IRegion region

The region.

NavigationContext navigationContext

The context representing the navigation request.

Returns
Type Description
object

The view to be the target of the navigation request.

Remarks

If none of the views in the region can be the target of the navigation request, a new view is created and added to the region.

Exceptions
Type Condition
ArgumentException

when a new view cannot be created for the navigation request.

Implements

IRegionNavigationContentLoader

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX