delphi - Is it possible to register the same class / interface multiple times in Spring4D? -


i'm playing around spring4d framework , think it's pretty cool. i'm trying achieve following

  globalcontainer.registercomponent<tperson>.implements<iperson>('normal');   globalcontainer.registercomponent<tperson>.implements<iperson>('testdata').delegateto(     function: tperson     begin       result := tperson.create;       result.setfirstname('bob');       result.setsurname('smith');     end   ); 

with tperson/iperson having obvious definitions. regardless if try

  person := servicelocator.getservice<iperson>('normal'); 

or

  person := servicelocator.getservice<iperson>('testdata'); 

i bob, possible or doing wrong?

this fixed in latest version of spring4d


Comments

Popular posts from this blog

Using 'OR' and 'AND' in SQL Server -

python - Finding intersection between ellipse and a line -

c++ - NetBeans Remote Development with additional configuration -