Allows the implementation of object factories used to create application context objects.
Get or set the name of the Object Factory.
public String Name { get; }
Finds out if the Object Factory contains a definition for an object of the given name.
public Boolean ContainsObject(name)
true if the Factory contains the object.
Name | Type | Summary |
---|---|---|
name | String | The name of the object to verify. |
Finds out if the Object Factory contains a definition for an object of the given System.Type.
public Boolean ContainsObject(objectType)
true if the Factory contains the object.
Name | Type | Summary |
---|---|---|
objectType | Type | The System.Type of the object to verify. |
Retrieves an initialized instance of the object for the given type
public GetObject<T>()
Retrieves an initialized instance of the object for the given type
public GetObject<T>(args)
Name | Type | Summary |
---|---|---|
args | Object[] | Constructor arguments. |
Retrieves an initialized instance of the object for the given name.
public Object GetObject(name)
The context object.
Name | Type | Summary |
---|---|---|
name | String | The name of the object to retrieve. |
Retrieves an initialized instance of the object for the given name.
public Object GetObject(name, thrown)
The context object or null if there was an error.
Name | Type | Summary |
---|---|---|
name | String | The name of the object to retrive. |
thrown | Boolean | true if an exception should be thrown or false if null should be returned when there is an error on creating the object. |
Retrieves an initialized instance of the object for the given name, passing the arguments to the object constructor
public Object GetObject(name, args)
The context object.
Name | Type | Summary |
---|---|---|
name | String | The name of the object to retrive. |
args | Object[] | The arguments to pass. |
Retrieves an initialized instance of the object for the given name and type.
public Object GetObject(name, requiredType)
The context object.
Name | Type | Summary |
---|---|---|
name | String | The name of the object to retrieve. |
requiredType | Type | The required Type of the object. |
Retrieves an initialized instance of the first object of objectType type.
public Object GetObject(objectType)
Name | Type | Summary |
---|---|---|
objectType | Type | The exact type of the object to retrive. |
Retrieves an initialized instance of the first object of objectType type.
public Object GetObject(objectType, args)
Name | Type | Summary |
---|---|---|
objectType | Type | The exact type of the object to retrive. |
args | Object[] | Constructor arguments |
Retrieves a list of initialized context object that are assignable from type
public IEnumerable GetObjectsOfContextAssignableFrom<T>()
A list of objects assignable from type
Retrieves a list of initialized context object that are assignable from type type.
public IEnumerable<Object> GetObjectsOfContextAssignableFrom(type)
A list of objects assignable from type.
Name | Type | Summary |
---|---|---|
type | Type | The type that the objects are asignable from. |
Retrives the Type of the object for the given name.
public Type GetType(name)
The Type of the object.
Name | Type | Summary |
---|---|---|
name | String | The name of the object to get its Type. |
Inject into the object o the dependencies of an object named name.
public Void InjectDependencies(name, o)
Name | Type | Summary |
---|---|---|
name | String | The name of the object to get it's dependencies. |
o | Object | The object where to inject the dependencies. |
Finds out if the object of the given name is a singleton.
public Boolean IsSingleton(name)
true is the object is a singleton or false otherwise.
Name | Type | Summary |
---|---|---|
name | String | The name of the object to verify. |