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
Post a Comment