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

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -