コード例 #1
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            if (CmdSite == null)
            {
                return;
            }
            ;
            WriteVerbose(string.Format("clear-cache on {0}", CmdSite.Url));
            var response = HostCommands.ClearCache(CmdSite);

            WriteObject(response);
        }
コード例 #2
0
        public override void Entry(IModHelper helper)
        {
            Utilities.Helper = helper;
            this.Config      = new ModConfig(Monitor, helper);

            hostCommands  = new HostCommands(Config);
            userCommands  = new UserCommands(Config);
            adminCommands = new AdminCommands(Config);

            helper.Events.GameLoop.OneSecondUpdateTicked += this.OnOneSecondUpdateTicked;
            helper.Events.GameLoop.Saved += this.OnSaved;

            var harmony = HarmonyInstance.Create(this.ModManifest.UniqueID);

            harmony.Patch(
                original: AccessTools.Method(typeof(StardewValley.Menus.ChatBox), nameof(StardewValley.Menus.ChatBox.receiveChatMessage)),
                postfix: new HarmonyMethod(typeof(ModEntry), nameof(ModEntry.receiveChatMessage_Postfix))
                );

            helper = this.Helper;
        }
コード例 #3
0
ファイル: HostCommandStub.cs プロジェクト: whinkloss/vst.net
 public HostCommandStub()
 {
     Commands = new HostCommands(this);
 }