Get Service Implementation?

1 view
Skip to first unread message

TrentCioran

unread,
May 31, 2009, 8:15:07 PM5/31/09
to LinFu.Framework
Hi, Someone knows how can i get the Type that implements a service
registered in the IServiceContainer? I've loked at the code of
ServiceContainer and ContainerExtensions but there is no way (at least
as i've seen) to get this information.

Is there a method to get this done? btw, I'm using the 2.0 branch.


Thanks

TrentCioran

Philip_L

unread,
May 31, 2009, 10:36:15 PM5/31/09
to LinFu.Framework
Hi Trent,

The only way to get the concrete type of a service implementation is
to call GetType() on the service instance once it comes out of the
container. Other than that, there's no way to determine what the
implementing type will be since all the object instantiation calls are
done with IFactory instances, and there's no way to tell what those
factories might create.

Regards,

Philip Laureano
Reply all
Reply to author
Forward
0 new messages