Commits

Mike Podonyi committed bae9386

convert a string in Type

  • Participants
  • Parent commits cd75ac6

Comments (0)

Files changed (1)

File src/Empi.Camino/DIContainer.cs

             Initialize();
         }
 
-
         internal static DIContainer GetDIContainer()
         {
             return DataStoreFactory.GetApplicationDataStore.LazyGet<DIContainer>("DIContainer", () => new DIContainer());
 
         private void Initialize()
         {
+            _DIContainer.Dispose();
+        
+        }
+
+        private void RegisterType(string from, string to, string name)
+        { 
+
+                //MP: mache eine tabelle {Baseclass, Class, Name}
+            //MP: initialize from DataBase
+
+            _DIContainer.RegisterType(Type.GetType(from), Type.GetType(to), name);
+        }
+
+        private void RegisterType(string from, string to)
+        {
+
             //MP: mache eine tabelle {Baseclass, Class, Name}
             //MP: initialize from DataBase
 
-            _DIContainer.RegisterType(typeof(IFileResourceProvider), typeof(LocalResourceProvider), "local");
+            _DIContainer.RegisterType(Type.GetType(from), Type.GetType(to));
         }
 
+
         public T Resolve<T>(string name)
         {
             return _DIContainer.Resolve<T>(name);
         }
 
     }
-}
+}