private void GameLoop_GameLaunched(object sender, GameLaunchedEventArgs e) { IQualityProductsAPI qualityProductsAPI = Helper.ModRegistry.GetApi <IQualityProductsAPI>("SilentOak.QualityProducts"); if (qualityProductsAPI == null) { Monitor.Log("Could not find Quality Products' API. This mod will be disabled.", LogLevel.Error); return; } RecipeManager.Init(qualityProductsAPI); PatchManager.Apply(typeof(MachineGenericPullRecipePatch)); }
public void Test_CalculateMethod_DllMissing() { Assert.Throws <DllNotFoundException>(() => PatchManager.Apply(typeof(PatchTest2)) ); }
public void Test_CalculateMethod_MethodMissing() { Assert.Throws <MissingMethodException>(() => PatchManager.Apply(typeof(PatchTest5))); }
public void Test_CalculateMethod_TypeMissing() { Assert.Throws <TypeLoadException>(() => PatchManager.Apply(typeof(PatchTest4))); }
public void Test_CalculateMethod_DllWrongVersion() { Assert.Throws <DllNotFoundException>(() => PatchManager.Apply(typeof(PatchTest3))); }