jeudi 12 février 2015

is there a way to register a factory in Unity's XML configuration?

Is there a way to register a factory in Unity's XML configuration? Unity should inject some constructor parameters and use the factory in order to instantiate the object.


Here is a Spring .NET based example:





<object id="name" type="Namespace.Factory, Assembly" factory-method="Create">
<constructor-arg name="intParam" value="1" />
<constructor-arg name="objParam" ref="objectName" />
</object>



Many thanks in advance!


Aucun commentaire:

Enregistrer un commentaire