Summer.Batch.Core.Scope.StepScopeSynchronization Class Reference

Static class that keeps track of the dependencies in the step scope and synchronizes the proxies. More...

Static Public Member Functions

static bool IsStepScope (Type type, string name)
 Checks if a dependency is in the step scope. More...
 
static void AddStepScopeDependency (Type registeredType, string name, IUnityContainer container, Type mappedType)
 Adds a new dependency in the step scope. More...
 
static void RemoveScopeDependency (Type type, string name)
 Removes a dependency from the step scope. More...
 
static void AddProxy (Type type, string name, IProxyObject proxy)
 Adds a new proxy for a dependency in the step scope. More...
 
static void ResetInstances ()
 Resets the instances cache to force resolving new instances when a step changes. More...
 
static object GetInstance (IProxyObject proxy)
 Retrieves the instance of a proxy. If an instance has been cached it is returned, otherwise a new one is resolved using the Unity container. More...
 
static Type GetMappedType (Type registeredType, string name)
 Get mapped type for registered type and given name. More...
 

Detailed Description

Static class that keeps track of the dependencies in the step scope and synchronizes the proxies.

Member Function Documentation

static void Summer.Batch.Core.Scope.StepScopeSynchronization.AddProxy ( Type  type,
string  name,
IProxyObject  proxy 
)
static

Adds a new proxy for a dependency in the step scope.

Parameters
typethe type of the dependency
namethe name of the dependency, or null if it has no name
proxythe new proxy
static void Summer.Batch.Core.Scope.StepScopeSynchronization.AddStepScopeDependency ( Type  registeredType,
string  name,
IUnityContainer  container,
Type  mappedType 
)
static

Adds a new dependency in the step scope.

Parameters
registeredTypethe type of the dependency
namethe name of the dependency, or null if it has no name
containerthe container to use for resolving the dependency
mappedTypethe actual type that will be resolved
static object Summer.Batch.Core.Scope.StepScopeSynchronization.GetInstance ( IProxyObject  proxy)
static

Retrieves the instance of a proxy. If an instance has been cached it is returned, otherwise a new one is resolved using the Unity container.

Parameters
proxythe proxy to get the instance for
Returns
the current instance of the proxy
static Type Summer.Batch.Core.Scope.StepScopeSynchronization.GetMappedType ( Type  registeredType,
string  name 
)
static

Get mapped type for registered type and given name.

Parameters
registeredType
name
Returns
static bool Summer.Batch.Core.Scope.StepScopeSynchronization.IsStepScope ( Type  type,
string  name 
)
static

Checks if a dependency is in the step scope.

Parameters
typethe type of the dependency
namethe name of the dependency, or null if it has no name
Returns
true if the dependency is in the step scope; false otherwise
static void Summer.Batch.Core.Scope.StepScopeSynchronization.RemoveScopeDependency ( Type  type,
string  name 
)
static

Removes a dependency from the step scope.

Parameters
typethe type of the dependency
namethe name of the dependency, or null if it has no name
static void Summer.Batch.Core.Scope.StepScopeSynchronization.ResetInstances ( )
static

Resets the instances cache to force resolving new instances when a step changes.


The documentation for this class was generated from the following file:
  • Summer.Batch.Core/Core/Scope/StepScopeSynchronization.cs