Show / Hide Table of Contents

Class RegionBehaviorFactory

Defines a factory that allows the registration of the default set of IRegionBehavior, that will be added to the IRegionBehaviorCollection of all IRegions, unless overridden on a 'per-region' basis.

Inheritance
object
RegionBehaviorFactory
MefRegionBehaviorFactory
Implements
IRegionBehaviorFactory
IEnumerable<string>
IEnumerable
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 RegionBehaviorFactory : IRegionBehaviorFactory, IEnumerable<string>, IEnumerable

Constructors

View Source

RegionBehaviorFactory(IServiceLocator)

Initializes a new instance of RegionBehaviorFactory.

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

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

Methods

View Source

AddIfMissing(string, Type)

Adds a particular type of RegionBehavior if it was not already registered. The behaviorKey string is used to check if the behavior is already present

Declaration
public void AddIfMissing(string behaviorKey, Type behaviorType)
Parameters
Type Name Description
string behaviorKey

The behavior key that's used to find if a certain behavior is already added.

Type behaviorType

Type of the behavior to add.

View Source

ContainsKey(string)

Determines whether a behavior with the specified key already exists.

Declaration
public bool ContainsKey(string behaviorKey)
Parameters
Type Name Description
string behaviorKey

The behavior key.

Returns
Type Description
bool

true if a behavior with the specified key is present; otherwise, false.

View Source

CreateFromKey(string)

Creates an instance of the behavior Type that is registered using the specified key.

Declaration
public IRegionBehavior CreateFromKey(string key)
Parameters
Type Name Description
string key

The key that is used to register a behavior type.

Returns
Type Description
IRegionBehavior

A new instance of the behavior.

View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<string> GetEnumerator()
Returns
Type Description
IEnumerator<string>

A IEnumerator<T> that can be used to iterate through the collection.

Implements

IRegionBehaviorFactory
IEnumerable<T>
IEnumerable

Extension Methods

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