public void HotUpgrading(PluginHotUpgradingContext context) { if (HotUpdateInfo.PreviousVersion) { return; } //Messenger.SendDebugInfo("正在进行插件热更新。"); }
public void HotUpgrading( PluginHotUpgradingContext context) { if (DateTime.Now.Second % 2 == 0) { context.Canceled = true; context.Reason = "月老板说,该时辰不利于更新!"; } }
public PluginHotUpgradingCommandResult Handle(PluginHotUpgradingCommand message) { var context = new PluginHotUpgradingContext(); _hotUpgradingMahuaEvents.Handle(x => { x.HotUpgrading(context); }); var re = new PluginHotUpgradingCommandResult { Canceled = context.Canceled, Reason = context.Reason, }; return(re); }
public PluginHotUpgradingCommandResult Handle(PluginHotUpgradingCommand message) { var context = new PluginHotUpgradingContext(); _hotUpgradingMahuaEvents.Handle(x => { x.HotUpgrading(context); }); var re = new PluginHotUpgradingCommandResult { Canceled = context.Canceled, Reason = context.Reason, }; if (!context.Canceled) { _amandaAuthCodeContainer.Save(); } return(re); }
public void HotUpgrading(PluginHotUpgradingContext context) { HotUpdateInfo.PreviousVersion = true; //Messenger.SendDebugInfo("正在进行插件热更新。"); }