Ejemplo n.º 1
0
        public RefreshLanguageService()
        {
            _instance = this;
            items     = new List <WeakReference>();

            _harmony = HarmonyInstance.Create(nameof(RefreshLanguageService));
            _harmony.Patch(typeof(ModItem).GetConstructors()[0], null, new HarmonyMethod(NoroHelper.MethodInfo(() => OnModItemCtor(null))));
        }
Ejemplo n.º 2
0
        public RefreshLanguageService()
        {
            _instance = this;
            items     = new List <WeakReference>();

            _harmony = HarmonyInstance.Create(nameof(RefreshLanguageService));
            var postfix = new HarmonyMethod(typeof(RefreshLanguageService).GetMethod(nameof(OnModItemCtor), All));

            _harmony.Patch(typeof(ModItem).GetConstructors()[0], null, postfix);
        }
Ejemplo n.º 3
0
 protected override void DisposeUnmanaged()
 {
     _instance = null;
     _harmony.UnpatchAll(nameof(RefreshLanguageService));
 }