Пример #1
0
        public static T GetImplementation <T>() where T : class
        {
            if (manager == null)
            {
                manager = new ImplementationProvider();
            }

            return(manager.PrivateGetImplementation <T>());
        }
Пример #2
0
        public static object GetImplementation(Type t)
        {
            if (manager == null)
            {
                manager = new ImplementationProvider();
            }

            if (implementations.ContainsKey(t))
            {
                return(implementations[t]);
            }
            else
            {
                throw new ImplementationNotLoadedException(t);
            }
        }