Show / Hide Table of Contents

Class RegionViewRegistry

Defines a registry for the content of the regions used on View Discovery composition.

Inheritance
object
RegionViewRegistry
MefRegionViewRegistry
Implements
IRegionViewRegistry
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 RegionViewRegistry : IRegionViewRegistry

Constructors

View Source

RegionViewRegistry(IServiceLocator)

Creates a new instance of the RegionViewRegistry class.

Declaration
public RegionViewRegistry(IServiceLocator locator)
Parameters
Type Name Description
IServiceLocator locator

CommonServiceLocator.IServiceLocator used to create the instance of the views from its Type.

Methods

View Source

CreateInstance(Type)

Creates an instance of a registered view Type.

Declaration
protected virtual object CreateInstance(Type type)
Parameters
Type Name Description
Type type

Type of the registered view.

Returns
Type Description
object

Instance of the registered view.

View Source

GetContents(string)

Returns the contents registered for a region.

Declaration
public IEnumerable<object> GetContents(string regionName)
Parameters
Type Name Description
string regionName

Name of the region which content is being requested.

Returns
Type Description
IEnumerable<object>

Collection of contents registered for the region.

View Source

RegisterViewWithRegion(string, Func<object>)

Registers a delegate that can be used to retrieve the content associated with a region name.

Declaration
public void RegisterViewWithRegion(string regionName, Func<object> getContentDelegate)
Parameters
Type Name Description
string regionName

Region name to which the getContentDelegate will be registered.

Func<object> getContentDelegate

Delegate used to retrieve the content associated with the regionName.

View Source

RegisterViewWithRegion(string, Type)

Registers a content type with a region name.

Declaration
public void RegisterViewWithRegion(string regionName, Type viewType)
Parameters
Type Name Description
string regionName

Region name to which the viewType will be registered.

Type viewType

Content type to be registered for the regionName.

Events

View Source

ContentRegistered

Occurs whenever a new view is registered.

Declaration
public event EventHandler<ViewRegisteredEventArgs> ContentRegistered
Event Type
Type Description
EventHandler<ViewRegisteredEventArgs>

Implements

IRegionViewRegistry

Extension Methods

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