Decompiling service locator pattern

2 posts, 0 answers
  1. Charlie
    Charlie avatar
    1 posts
    Member since:
    May 2013

    Posted 03 May 2013 Link to this post


    I decompiled an assembly that uses a service locator pattern. The results were somewhat lacking and I wonder if this is a consequence of the SL pattern being loosely coupled?

    So for example

    I get :

        internal static class ServiceLocator
            public static IService1 Service1;

            public static IService2 Service2;

            public static IService3 Service3;

            public static IService4 Service4;

    Which doesn't actually show the code that would instantiate Service1, 2, 3 or 4 so if you use this example, Service 1 will always be null if you try to use the class.

    Being relatively new to the service locator pattern, would anyone care to hazard a guess as to how it should look?

    For example in code where this class is used I can see things like :


  2. Kaloyan
    Kaloyan avatar
    920 posts

    Posted 10 May 2013 Link to this post


    Sorry for the late response. Can we get a copy of the aforementioned assembly so we can investigate the code snippet further?

    the Telerik team
    Tell us what you think about JustDecompile. Your opinion matters! You can use our forum, or our JustDecompile UserVoice website for feature requests.
Back to Top