Пример #1
0
 public void HotUpgrading(PluginHotUpgradingContext context)
 {
     if (HotUpdateInfo.PreviousVersion)
     {
         return;
     }
     //Messenger.SendDebugInfo("正在进行插件热更新。");
 }
Пример #2
0
 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);
        }
Пример #4
0
        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);
        }
Пример #5
0
 public void HotUpgrading(PluginHotUpgradingContext context)
 {
     HotUpdateInfo.PreviousVersion = true;
     //Messenger.SendDebugInfo("正在进行插件热更新。");
 }