Ejemplo n.º 1
0
        //  IMPORTANT: Caller of this constructor must check if dll file exists and better put it into try/catch
        public MyPluginLoader(string dllPath)
        {
            Type objType = null;

            Assembly ass = Assembly.LoadFile(dllPath);
            objType = ass.GetType("MinerWars.SimplePlugin.MySimplePlugin");

            Plugin = (MyIPlugin)Activator.CreateInstance(objType);
            Plugin.Host = this;
        }
Ejemplo n.º 2
0
        //  IMPORTANT: Caller of this constructor must check if dll file exists and better put it into try/catch
        public MyPluginLoader(string dllPath)
        {
            Type objType = null;

            Assembly ass = Assembly.LoadFile(dllPath);

            objType = ass.GetType("MinerWars.SimplePlugin.MySimplePlugin");

            Plugin      = (MyIPlugin)Activator.CreateInstance(objType);
            Plugin.Host = this;
        }