tamaramata / solrnet

Automatically exported from code.google.com/p/solrnet
0 stars 0 forks source link

refactor for Microsoft.Practices.ServiceLocation #174

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
one IOC container solution is of Microsoft.Practices.ServiceLocation.DLL, but 
ServiceLocation did included by some class, such as Startup and DSLRun.

the refactor is:
1. only Startup will include ServiceLocation
        public static T GetInstance<T>() 
        {
            return ServiceLocator.Current.GetInstance<T>();
        }
2. other class will use Startup to support container
        changes
               ServiceLocator.Current.GetInstance<T>()
        to
               Startup.GetInstance<T>()

Original issue reported on code.google.com by tom...@hotmail.com on 22 Feb 2012 at 8:34

GoogleCodeExporter commented 8 years ago
Can you elaborate a bit? Where / how does this fail?

Original comment by mauricio...@gmail.com on 22 Feb 2012 at 1:33

GoogleCodeExporter commented 8 years ago
i am sorry, this is not a defect, but a Refactor.

Original comment by tom...@hotmail.com on 27 Feb 2012 at 5:55

GoogleCodeExporter commented 8 years ago
I don't see what's the benefit of this refactor. Can you please explain?

Original comment by mauricio...@gmail.com on 27 Feb 2012 at 1:02

GoogleCodeExporter commented 8 years ago
Ping! Without any further input I'll have to close this.

Original comment by mauricio...@gmail.com on 23 Apr 2012 at 9:25

GoogleCodeExporter commented 8 years ago
Closed due to lack of input. I'm guessing it's a duplicate of #125

Original comment by mauricio...@gmail.com on 30 Apr 2012 at 4:38