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() }); }
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() }; }