Craig's Utility Library  4.0 Beta
Utilities.IoC.BaseClasses.BootstrapperBase< Container > Class Template Referenceabstract

Bootstrapper base class More...

Inheritance diagram for Utilities.IoC.BaseClasses.BootstrapperBase< Container >:
Utilities.IoC.Interfaces.IBootstrapper

Public Member Functions

void AddAssembly (params Assembly[] Assemblies)
 Adds the assembly. More...
 
void Dispose ()
 Disposes of the object More...
 
abstract void Register< T > (T Object, string Name="")
 Registers an object with the bootstrapper More...
 
abstract void Register< T > (string Name="")
 Registers a type with the default constructor More...
 
abstract void Register< T1, T2 > (string Name="")
 Registers a type with the default constructor of a child class More...
 
abstract void Register< T > (Func< T > Function, string Name="")
 Registers a type with a function More...
 
abstract void RegisterAll< T > ()
 Registers all objects of a certain type with the bootstrapper More...
 
abstract T Resolve< T > (T DefaultObject=default(T))
 Resolves the object based on the type specified More...
 
abstract T Resolve< T > (string Name, T DefaultObject=default(T))
 Resolves the object based on the type specified More...
 
abstract object Resolve (Type ObjectType, object DefaultObject=null)
 Resolves the object based on the type specified More...
 
abstract object Resolve (Type ObjectType, string Name, object DefaultObject=null)
 Resolves the object based on the type specified More...
 
abstract IEnumerable< T > ResolveAll< T > ()
 Resolves the objects based on the type specified More...
 
abstract IEnumerable< object > ResolveAll (Type ObjectType)
 Resolves all objects based on the type specified More...
 

Protected Member Functions

 BootstrapperBase (IEnumerable< Assembly > assemblies, IEnumerable< Type > types)
 Constructor More...
 
virtual void Dispose (bool Managed)
 Disposes of the object More...
 

Properties

abstract string Name [get]
 Name of the bootstrapper More...
 
abstract Container AppContainer [get]
 The IoC container More...
 
List< Type > Types [get]
 Gets the types. More...
 
- Properties inherited from Utilities.IoC.Interfaces.IBootstrapper
string Name [get]
 Name of the bootstrapper More...
 

Detailed Description

Bootstrapper base class

Template Parameters
ContainerThe actual IoC object

Definition at line 34 of file BootstrapperBase.cs.

Constructor & Destructor Documentation

Utilities.IoC.BaseClasses.BootstrapperBase< Container >.BootstrapperBase ( IEnumerable< Assembly >  assemblies,
IEnumerable< Type >  types 
)
protected

Constructor

Parameters
assembliesThe assemblies.
typesThe types.

Definition at line 41 of file BootstrapperBase.cs.

Member Function Documentation

void Utilities.IoC.BaseClasses.BootstrapperBase< Container >.AddAssembly ( params Assembly[]  Assemblies)

Adds the assembly.

Parameters
AssembliesThe assemblies.

Implements Utilities.IoC.Interfaces.IBootstrapper.

Definition at line 73 of file BootstrapperBase.cs.

void Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Dispose ( )

Disposes of the object

Definition at line 94 of file BootstrapperBase.cs.

virtual void Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Dispose ( bool  Managed)
protectedvirtual

Disposes of the object

Parameters
ManagedDetermines if all objects should be disposed or just managed objects

Definition at line 200 of file BootstrapperBase.cs.

abstract void Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Register< T > ( Object,
string  Name = "" 
)
pure virtual

Registers an object with the bootstrapper

Template Parameters
TObject type
Parameters
ObjectObject to register
NameName associated with the object

Implements Utilities.IoC.Interfaces.IBootstrapper.

Type Constraints
T :class 
abstract void Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Register< T > ( string  Name = "")
pure virtual

Registers a type with the default constructor

Template Parameters
TObject type to register
Parameters
NameName associated with the object

Implements Utilities.IoC.Interfaces.IBootstrapper.

Type Constraints
T :class 
T :new() 
abstract void Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Register< T > ( Func< T >  Function,
string  Name = "" 
)
pure virtual

Registers a type with a function

Template Parameters
TType that the function returns
Parameters
NameName associated with the object
FunctionFunction to register with the type

Implements Utilities.IoC.Interfaces.IBootstrapper.

Type Constraints
T :class 
abstract void Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Register< T1, T2 > ( string  Name = "")
pure virtual

Registers a type with the default constructor of a child class

Template Parameters
T1Base class/interface type
T2Child class type
Parameters
NameName associated with the object

Implements Utilities.IoC.Interfaces.IBootstrapper.

Type Constraints
T2 :class 
T2 :T1 
T1 :class 
abstract void Utilities.IoC.BaseClasses.BootstrapperBase< Container >.RegisterAll< T > ( )
pure virtual

Registers all objects of a certain type with the bootstrapper

Template Parameters
TObject type

Implements Utilities.IoC.Interfaces.IBootstrapper.

Type Constraints
T :class 
abstract object Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Resolve ( Type  ObjectType,
object  DefaultObject = null 
)
pure virtual

Resolves the object based on the type specified

Parameters
ObjectTypeObject type
DefaultObjectDefault object to return if the type can not be resolved
Returns
An object of the specified type

Implements Utilities.IoC.Interfaces.IBootstrapper.

abstract object Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Resolve ( Type  ObjectType,
string  Name,
object  DefaultObject = null 
)
pure virtual

Resolves the object based on the type specified

Parameters
ObjectTypeObject type
NameName associated with the object
DefaultObjectDefault object to return if the type can not be resolved
Returns
An object of the specified type

Implements Utilities.IoC.Interfaces.IBootstrapper.

abstract T Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Resolve< T > ( DefaultObject = default(T))
pure virtual

Resolves the object based on the type specified

Template Parameters
TType to resolve
Parameters
DefaultObjectDefault object to return if the type can not be resolved
Returns
An object of the specified type

Implements Utilities.IoC.Interfaces.IBootstrapper.

Type Constraints
T :class 
abstract T Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Resolve< T > ( string  Name,
DefaultObject = default(T) 
)
pure virtual

Resolves the object based on the type specified

Template Parameters
TType to resolve
Parameters
NameName associated with the object
DefaultObjectDefault object to return if the type can not be resolved
Returns
An object of the specified type

Implements Utilities.IoC.Interfaces.IBootstrapper.

Type Constraints
T :class 
abstract IEnumerable<object> Utilities.IoC.BaseClasses.BootstrapperBase< Container >.ResolveAll ( Type  ObjectType)
pure virtual

Resolves all objects based on the type specified

Parameters
ObjectTypeObject type
Returns
A list of objects of the specified type

Implements Utilities.IoC.Interfaces.IBootstrapper.

abstract IEnumerable<T> Utilities.IoC.BaseClasses.BootstrapperBase< Container >.ResolveAll< T > ( )
pure virtual

Resolves the objects based on the type specified

Template Parameters
TType to resolve
Returns
A list of objects of the specified type

Implements Utilities.IoC.Interfaces.IBootstrapper.

Type Constraints
T :class 

Property Documentation

abstract Container Utilities.IoC.BaseClasses.BootstrapperBase< Container >.AppContainer
getprotected

The IoC container

Definition at line 55 of file BootstrapperBase.cs.

abstract string Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Name
get

Name of the bootstrapper

Definition at line 50 of file BootstrapperBase.cs.

List<Type> Utilities.IoC.BaseClasses.BootstrapperBase< Container >.Types
getprotected

Gets the types.

The types.

Definition at line 61 of file BootstrapperBase.cs.


The documentation for this class was generated from the following file: