example how to configure container:
<ObjectBuilder>
<Items>
<addType interfaceToLoad="CoreAlgorithm.Model.GeneticAlgorithm.PopulationManagement.IPopulationGenerator"
classToLoad="CoreAlgorithm.Model.GeneticAlgorithm.PopulationManagement.PopulationGenerator"
LifecycleType="Singleton"/>

<addType interfaceToLoad="CoreAlgorithm.Model.GeneticAlgorithm.Algorithm.GenerationCreator.IGenerationCreator"
classToLoad="CoreAlgorithm.Model.GeneticAlgorithm.Algorithm.GenerationCreator.Roulette"
LifecycleType="OncePerThread"/>

<addType interfaceToLoad="CoreAlgorithm.Model.GeneticAlgorithm.Algorithm.EvolvingMeasurer.IAlgorithmEvolvingMeter"
classToLoad="CoreAlgorithm.Model.GeneticAlgorithm.Algorithm.EvolvingMeasurer.AlgorithmEvolvingMeter"
LifecycleType="OncePerRequest"/>
</items>
</ObjectBuilder>


and how to use it:
protected readonly IAlgorithmEvolvingMeter evolvingMeter =
SingletonObjectFactory.GetService<IAlgorithmEvolvingMeter>();

Last edited Jul 20, 2010 at 10:51 AM by JakubElias, version 3

Comments

No comments yet.