private void Initialize(IRuntimeFactoryInformation runtimeFactoryInformation)
 {
     Type[][] allTypes = runtimeFactoryInformation.GetTypes();
     foreach (Type[] pair in allTypes)
     {
         _map[pair[0]]       = pair[1];
         _instances[pair[0]] = Activator.CreateInstance(pair[1]);
     }
 }
        private static IRuntimeFactoryInformation GetRuntimeFactoryInformation()
        {
            Type   factoryMapType = GetFactoryMapType();
            object instance       = Activator.CreateInstance(factoryMapType);
            IRuntimeFactoryInformation factoryInformation = instance as IRuntimeFactoryInformation;

            if (factoryInformation == null)
            {
                throw new ObjectFactoryException("{0} should be a {1}", instance, typeof(IRuntimeFactoryInformation));
            }
            return(factoryInformation);
        }