Show / Hide Table of Contents

Class RegionAdapterBase<T>

Base class to facilitate the creation of IRegionAdapter implementations.

Inheritance
System.Object
RegionAdapterBase<T>
ItemsControlRegionAdapter
Implements
IRegionAdapter
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Presentation.Regions
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public abstract class RegionAdapterBase<T> : IRegionAdapter where T : class
Type Parameters
Name Description
T

Type of object to adapt.

Constructors

View Source

RegionAdapterBase(IRegionBehaviorFactory)

Initializes a new instance of RegionAdapterBase<T>.

Declaration
protected RegionAdapterBase(IRegionBehaviorFactory regionBehaviorFactory)
Parameters
Type Name Description
IRegionBehaviorFactory regionBehaviorFactory

The factory used to create the region behaviors to attach to the created regions.

Properties

View Source

RegionBehaviorFactory

Gets or sets the factory used to create the region behaviors to attach to the created regions.

Declaration
protected IRegionBehaviorFactory RegionBehaviorFactory { get; set; }
Property Value
Type Description
IRegionBehaviorFactory

Methods

View Source

Adapt(IRegion, T)

Template method to adapt the object to an IRegion.

Declaration
protected abstract void Adapt(IRegion region, T regionTarget)
Parameters
Type Name Description
IRegion region

The new region being used.

T regionTarget

The object to adapt.

View Source

AttachBehaviors(IRegion, T)

Template method to attach new behaviors.

Declaration
protected virtual void AttachBehaviors(IRegion region, T regionTarget)
Parameters
Type Name Description
IRegion region

The region being used.

T regionTarget

The object to adapt.

View Source

AttachDefaultBehaviors(IRegion, T)

This method adds the default behaviors by using the IRegionBehaviorFactory object.

Declaration
protected virtual void AttachDefaultBehaviors(IRegion region, T regionTarget)
Parameters
Type Name Description
IRegion region

The region being used.

T regionTarget

The object to adapt.

View Source

CreateRegion()

Template method to create a new instance of IRegion that will be used to adapt the object.

Declaration
protected abstract IRegion CreateRegion()
Returns
Type Description
IRegion

A new instance of IRegion.

View Source

Initialize(T, String)

Adapts an object and binds it to a new IRegion.

Declaration
public IRegion Initialize(T regionTarget, string regionName)
Parameters
Type Name Description
T regionTarget

The object to adapt.

System.String regionName

The name of the region to be created.

Returns
Type Description
IRegion

The new instance of IRegion that the regionTarget is bound to.

Explicit Interface Implementations

View Source

IRegionAdapter.Initialize(Object, String)

Adapts an object and binds it to a new IRegion.

Declaration
IRegion IRegionAdapter.Initialize(object regionTarget, string regionName)
Parameters
Type Name Description
System.Object regionTarget

The object to adapt.

System.String regionName

The name of the region to be created.

Returns
Type Description
IRegion

The new instance of IRegion that the regionTarget is bound to.

Remarks

This methods performs validation to check that regionTarget is of type T.

Exceptions
Type Condition
System.ArgumentNullException

When regionTarget is null.

System.InvalidOperationException

When regionTarget is not of type T.

Implements

IRegionAdapter

Extension Methods

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