Exemplo n.º 1
0
        public IPluginInstance GetGamePlugin(IPluginHost sink, string pluginName)
        {
            IGamePlugin plugin;

            if (pluginName == "ErrorPlugin")
            {
                plugin = new ErrorPlugin("Error plugin is used");
            }
            else
            {
                plugin = new TestPlugin();
            }

            string errorMsg;

            plugin.SetupInstance(sink, null, out errorMsg);
            return(new PluginInstance {
                Plugin = plugin, Version = GetEnvironmentVersion()
            });
        }
Exemplo n.º 2
0
        public IPluginInstance GetGamePlugin(IPluginHost sink, string pluginName)
        {
            IGamePlugin plugin;
            if (pluginName == "ErrorPlugin")
            {
                plugin = new ErrorPlugin("Error plugin is used");
            }
            else
            {
                plugin = new TestPlugin();
            }

            string errorMsg;
            plugin.SetupInstance(sink, null, out errorMsg);
            return new PluginInstance { Plugin = plugin, Version = GetEnvironmentVersion() };
        }