Click or drag to resize

DependencyInjectionScope Class

Abstract class which defines a Dependency Injection scope in which dependency injection takes place with the information provided with this scope.
Inheritance Hierarchy
SystemObject
  SD.LLBLGen.Pro.ORMSupportClassesDependencyInjectionScope

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.10.0.0 (5.10.0)
Syntax
public abstract class DependencyInjectionScope : IDisposable

The DependencyInjectionScope type exposes the following members.

Constructors
  NameDescription
Protected methodDependencyInjectionScope
Initializes a new instance of the DependencyInjectionScope class.
Top
Methods
  NameDescription
Protected methodAddInjectionInfo(Type, Type, String)
Adds the injection info passed in to the scope data. Call this method one or more times from an override of InitializeScope.
Protected methodAddInjectionInfo(Type, Type, String, DependencyInjectionTargetKind, DependencyInjectionContextType)
Adds the injection info passed in to the scope data. Call this method one or more times from an override of InitializeScope.
Protected methodAddInjectionInfo(Type, Type, String, DependencyInjectionTargetKind, DependencyInjectionContextType, IEnumerableString)
Adds the injection info passed in to the scope data. Call this method one or more times from an override of InitializeScope.
Public methodBeginScope
(Re)starts the scope and will add the scope to the dependency injection provider. Use this method if the scope was already stopped via the EndScope or (indirectly) through the Dispose method, and you want to re-start it, which can be useful if your scope contains a lot of injection info and rebuilding it can take a couple of milliseconds so you can store scope instances in a thread local cache for example.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEndScope
Ends the scope and removes the scope from the dependency injection provider. After this method, call StartScope again to re-add the DI data to the provider again.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodInitializeScope
Initializes the scope. Use this method to add injection info to the scope by subsequential calls to AddInjectionInfo
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
To use a dependency injection scope to define dependency injection for a specific area in your code, derive a class from this class and fill it with data using subsequential calls to the AddInjectionInfo method from within an override of InitializeScope. Instantiate the scope with a using statement which will automatically close the scope when Dispose is called. Languages which don't have a using statement (e.g. VB.NET in .NET 1.x) should call Dispose manually. The scope is thread safe and local to the calling thread. Don't pass scopes to other threads.
See Also