Esempio n. 1
0
        static bool LoadBackend(string type)
        {
            int    i        = type.IndexOf(',');
            string assembly = type.Substring(i + 1).Trim();

            type = type.Substring(0, i).Trim();
            try {
                Assembly asm = Assembly.Load(assembly);
                if (asm != null)
                {
                    Type t = asm.GetType(type);
                    if (t != null)
                    {
                        engine = (EngineBackend)Activator.CreateInstance(t);
                        return(true);
                    }
                }
            }
            catch {
            }
            return(false);
        }