Export to GitHub

linfu - issue #3

Non-generic SimpleContainer GetService method


Posted on Apr 15, 2008 by Massive Kangaroo

Can you add a non-generic version of GetService to SimpleContainer please? I am using the container to assign dependencies on an object not managed by the container. However, this is done using reflection at runtime. So right now I have to jump through the MakeGenericMethod hoop...

Basically, I need: object GetService(Type type);

Many thanks!

Comment #1

Posted on Apr 15, 2008 by Massive Bird

Hi AJ,

I've updated the SimpleContainer class with a set of non-generic GetService() methods. The SimpleContainer class now supports the following methods:

    public object GetService(Type serviceType)
    {
           // ...
    }

    public object GetService(Type serviceType, string serviceName)
    {
           // ...
    }

HTH :)

Comment #2

Posted on Apr 16, 2008 by Massive Kangaroo

Excellent! Thank you very much! :)

Status: Fixed

Labels:
Type-Defect Priority-Medium