Messages.cs 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205
  1. using NTMiner.Core;
  2. using NTMiner.Core.Gpus;
  3. using NTMiner.Core.MinerServer;
  4. using NTMiner.Core.MinerStudio;
  5. using NTMiner.Core.Profile;
  6. using NTMiner.Hub;
  7. using NTMiner.Mine;
  8. using NTMiner.User;
  9. using NTMiner.Ws;
  10. using System;
  11. namespace NTMiner {
  12. [MessageType(description: "停止挖矿")]
  13. public class StopMineCommand : Cmd {
  14. public StopMineCommand() { }
  15. }
  16. [MessageType(description: "打开windows重启倒计时界面")]
  17. public class ShowRestartWindowsCommand : Cmd {
  18. public ShowRestartWindowsCommand(int countDownSeconds) {
  19. this.CountDownSeconds = countDownSeconds;
  20. }
  21. public int CountDownSeconds { get; private set; }
  22. }
  23. [MessageType(description: "打开内核下载界面")]
  24. public class ShowKernelDownloaderCommand : Cmd {
  25. public ShowKernelDownloaderCommand(Guid kernelId, Action<bool, string> downloadComplete) {
  26. this.KernelId = kernelId;
  27. this.DownloadComplete = downloadComplete;
  28. }
  29. public Guid KernelId { get; private set; }
  30. public Action<bool, string> DownloadComplete { get; private set; }
  31. }
  32. [MessageType(description: "设置开机自动挖矿")]
  33. public class SetAutoStartCommand : Cmd {
  34. public SetAutoStartCommand(bool isAutoBoot, bool isAutoStart) {
  35. this.IsAutoBoot = isAutoBoot;
  36. this.IsAutoStart = isAutoStart;
  37. }
  38. public bool IsAutoBoot { get; private set; }
  39. public bool IsAutoStart { get; private set; }
  40. }
  41. [MessageType(description: "ServerContext重新初始化后")]
  42. public class ServerContextReInitedEvent : EventBase {
  43. public ServerContextReInitedEvent() { }
  44. }
  45. [MessageType(description: "处理了ServerContext重新初始化后事件后")]
  46. public class ServerContextReInitedEventHandledEvent : EventBase {
  47. public ServerContextReInitedEventHandledEvent() { }
  48. }
  49. [MessageType(description: "LocalContext刷新后")]
  50. public class LocalContextReInitedEvent : EventBase {
  51. public LocalContextReInitedEvent() { }
  52. }
  53. [MessageType(description: "LocalContext的视图层刷新完毕后")]
  54. public class LocalContextVmsReInitedEvent : EventBase {
  55. public LocalContextVmsReInitedEvent() { }
  56. }
  57. [MessageType(description: "发现了NTMiner或MinerStudio新版本")]
  58. public class AppVersionChangedEvent : EventBase {
  59. /// <summary>
  60. /// 如果给定的服务器版本比本地版本高则发布AppVersionChangedEvent事件
  61. /// </summary>
  62. /// <param name="serverVersion"></param>
  63. public static void PublishIfNewVersion(string serverVersion) {
  64. if (!string.IsNullOrEmpty(serverVersion) && serverVersion != EntryAssemblyInfo.CurrentVersionStr) {
  65. if (Version.TryParse(serverVersion, out Version v)) {
  66. if (v > EntryAssemblyInfo.CurrentVersion) {
  67. NTMinerContext.ServerVersion = v;
  68. VirtualRoot.RaiseEvent(new AppVersionChangedEvent());
  69. }
  70. }
  71. }
  72. }
  73. public AppVersionChangedEvent() { }
  74. }
  75. [MessageType(description: "内核自我重启")]
  76. public class KernelSelfRestartedEvent : EventBase {
  77. public KernelSelfRestartedEvent() { }
  78. }
  79. [MessageType(description: "开始挖矿")]
  80. public class StartingMineEvent : EventBase {
  81. public StartingMineEvent() {
  82. }
  83. }
  84. [MessageType(description: "开始挖矿不成功")]
  85. public class StartingMineFailedEvent : EventBase {
  86. public StartingMineFailedEvent(string message) {
  87. this.Message = message;
  88. }
  89. public string Message { get; private set; }
  90. }
  91. [MessageType(description: "挖矿开始事件")]
  92. public class MineStartedEvent : EventBase {
  93. public MineStartedEvent(IMineContext mineContext) {
  94. this.MineContext = mineContext;
  95. }
  96. public IMineContext MineContext { get; private set; }
  97. }
  98. [MessageType(description: "挖矿上下文发生了变更")]
  99. public class CurrentMineContextChangedEvent : EventBase {
  100. public CurrentMineContextChangedEvent() { }
  101. }
  102. [MessageType(description: "挖矿停止事件")]
  103. public class MineStopedEvent : EventBase {
  104. public MineStopedEvent(IMineContext mineContext, StopMineReason stopReason) {
  105. this.MineContext = mineContext;
  106. this.StopReason = stopReason;
  107. }
  108. public IMineContext MineContext { get; private set; }
  109. public StopMineReason StopReason { get; private set; }
  110. }
  111. [MessageType(description: "关闭NTMiner客户端")]
  112. // ReSharper disable once InconsistentNaming
  113. public class CloseNTMinerCommand : Cmd {
  114. public CloseNTMinerCommand(string reason) {
  115. this.Reason = reason;
  116. }
  117. public string Reason { get; private set; }
  118. }
  119. [MessageType(description: "刷新开机启动和自动挖矿")]
  120. public class RefreshAutoBootStartCommand : Cmd {
  121. public RefreshAutoBootStartCommand() { }
  122. }
  123. [MessageType(description: "刷新主界面状态栏的windows远程桌面图标颜色")]
  124. public class RefreshIsRemoteDesktopEnabledCommand : Cmd {
  125. public RefreshIsRemoteDesktopEnabledCommand() {
  126. }
  127. }
  128. [MessageType(description: "更新挖矿端界面上显示的外网群控状态")]
  129. public class RefreshWsStateCommand : Cmd {
  130. public RefreshWsStateCommand(WsClientState wsClientState) {
  131. this.WsClientState = wsClientState;
  132. }
  133. public WsClientState WsClientState { get; private set; }
  134. }
  135. public class ServerJsonVersionChangedEvent : EventBase {
  136. public ServerJsonVersionChangedEvent(string oldVersion, string newVersion) {
  137. this.OldVersion = oldVersion;
  138. this.NewVersion = newVersion;
  139. }
  140. public string OldVersion { get; private set; }
  141. public string NewVersion { get; private set; }
  142. }
  143. [MessageType(description: "电价变更后")]
  144. public class EPriceChangedEvent : EventBase {
  145. public EPriceChangedEvent() {
  146. }
  147. }
  148. [MessageType(description: "功耗补偿变更后")]
  149. public class PowerAppendChangedEvent : EventBase {
  150. public PowerAppendChangedEvent() { }
  151. }
  152. [MessageType(description: "高温红色阈值变更后")]
  153. public class MaxTempChangedEvent : EventBase {
  154. public MaxTempChangedEvent() { }
  155. }
  156. [MessageType(description: "收益计算器数据集初始化后")]
  157. public class CalcConfigSetInitedEvent : EventBase {
  158. public CalcConfigSetInitedEvent() {
  159. }
  160. }
  161. [MessageType(description: "从内核输出中提取了矿池延时")]
  162. public class PoolDelayPickedEvent : EventBase {
  163. public PoolDelayPickedEvent(Guid poolId, bool isDual, string poolDelay) {
  164. this.PoolDelayText = poolDelay;
  165. this.PoolId = poolId;
  166. this.IsDual = isDual;
  167. }
  168. public Guid PoolId { get; private set; }
  169. public bool IsDual { get; private set; }
  170. /// <summary>
  171. /// 矿池延时只用于展示,没有其它用户所以是字符串
  172. /// </summary>
  173. public string PoolDelayText { get; private set; }
  174. }
  175. [MessageType(description: "CPU包的状态发生了变更")]
  176. public class CpuPackageStateChangedEvent : EventBase {
  177. public CpuPackageStateChangedEvent() {
  178. }
  179. }
  180. #region toolbox
  181. [MessageType(description: "禁用win10系统更新")]
  182. public class BlockWAUCommand : Cmd {
  183. public BlockWAUCommand() { }
  184. }
  185. [MessageType(description: "优化window10")]
  186. public class Win10OptimizeCommand : Cmd {
  187. public Win10OptimizeCommand() { }
  188. }
  189. [MessageType(description: "开起A卡计算模式")]
  190. public class SwitchRadeonGpuCommand : Cmd {
  191. public SwitchRadeonGpuCommand(bool on) {
  192. this.On = on;
  193. }
  194. public bool On { get; private set; }
  195. }
  196. [MessageType(description: "A卡驱动签名")]
  197. public class AtikmdagPatcherCommand : Cmd {
  198. public AtikmdagPatcherCommand() {
  199. }
  200. }
  201. [MessageType(description: "注册右键打开windows命令行菜单")]
  202. public class RegCmdHereCommand : Cmd {
  203. public RegCmdHereCommand() { }
  204. }
  205. [MessageType(description: "移除右键打开windows命令行菜单")]
  206. public class UnRegCmdHereCommand : Cmd {
  207. public UnRegCmdHereCommand() { }
  208. }
  209. #endregion
  210. #region profile Messages
  211. [MessageType(description: "MinerProfile设置变更后")]
  212. public class MinerProfilePropertyChangedEvent : EventBase {
  213. public MinerProfilePropertyChangedEvent(string propertyName) {
  214. this.PropertyName = propertyName;
  215. }
  216. public string PropertyName { get; private set; }
  217. }
  218. [MessageType(description: "挖矿币种级设置变更后")]
  219. public class CoinProfilePropertyChangedEvent : EventBase {
  220. public CoinProfilePropertyChangedEvent(Guid coinId, string propertyName) {
  221. this.CoinId = coinId;
  222. this.PropertyName = propertyName;
  223. }
  224. public Guid CoinId { get; }
  225. public string PropertyName { get; private set; }
  226. }
  227. [MessageType(description: "矿池级设置变更后")]
  228. public class PoolProfilePropertyChangedEvent : EventBase {
  229. public PoolProfilePropertyChangedEvent(Guid coinId, string propertyName) {
  230. this.PoolId = coinId;
  231. this.PropertyName = propertyName;
  232. }
  233. public Guid PoolId { get; }
  234. public string PropertyName { get; private set; }
  235. }
  236. [MessageType(description: "挖矿币种内核级设置变更后")]
  237. public class CoinKernelProfilePropertyChangedEvent : EventBase {
  238. public CoinKernelProfilePropertyChangedEvent(Guid coinKernelId, string propertyName) {
  239. this.CoinKernelId = coinKernelId;
  240. this.PropertyName = propertyName;
  241. }
  242. public Guid CoinKernelId { get; }
  243. public string PropertyName { get; private set; }
  244. }
  245. [MessageType(description: "Gpu超频集合刷新后")]
  246. public class GpuProfileSetRefreshedEvent : EventBase {
  247. public GpuProfileSetRefreshedEvent() { }
  248. }
  249. #endregion
  250. #region NTMinerWallet Messages
  251. [MessageType(description: "添加NTMiner钱包")]
  252. public class AddNTMinerWalletCommand : AddEntityCommand<INTMinerWallet> {
  253. public AddNTMinerWalletCommand(INTMinerWallet input) : base(input) {
  254. }
  255. }
  256. [MessageType(description: "更新NTMiner钱包")]
  257. public class UpdateNTMinerWalletCommand : UpdateEntityCommand<INTMinerWallet> {
  258. public UpdateNTMinerWalletCommand(INTMinerWallet input) : base(input) {
  259. }
  260. }
  261. [MessageType(description: "删除NTMiner钱包")]
  262. public class RemoveNTMinerWalletCommand : RemoveEntityCommand {
  263. public RemoveNTMinerWalletCommand(Guid entityId) : base(entityId) {
  264. }
  265. }
  266. [MessageType(description: "添加NTMiner钱包后")]
  267. public class NTMinerWalletAddedEvent : SourcedEvent<INTMinerWallet> {
  268. public NTMinerWalletAddedEvent(PathId targetPathId, INTMinerWallet source) : base(targetPathId, source) {
  269. }
  270. }
  271. [MessageType(description: "更新NTMiner钱包后")]
  272. public class NTMinerWalletUpdatedEvent : SourcedEvent<INTMinerWallet> {
  273. public NTMinerWalletUpdatedEvent(PathId targetPathId, INTMinerWallet source) : base(targetPathId, source) {
  274. }
  275. }
  276. [MessageType(description: "删除NTMiner钱包后")]
  277. public class NTMinerWalletRemovedEvent : SourcedEvent<INTMinerWallet> {
  278. public NTMinerWalletRemovedEvent(PathId targetPathId, INTMinerWallet source) : base(targetPathId, source) {
  279. }
  280. }
  281. #endregion
  282. #region OverClockData Messages
  283. [MessageType(description: "添加超频菜谱")]
  284. public class AddOverClockDataCommand : AddEntityCommand<IOverClockData> {
  285. public AddOverClockDataCommand(IOverClockData input) : base(input) {
  286. }
  287. }
  288. [MessageType(description: "更新超频菜谱")]
  289. public class UpdateOverClockDataCommand : UpdateEntityCommand<IOverClockData> {
  290. public UpdateOverClockDataCommand(IOverClockData input) : base(input) {
  291. }
  292. }
  293. [MessageType(description: "删除超频菜谱")]
  294. public class RemoveOverClockDataCommand : RemoveEntityCommand {
  295. public RemoveOverClockDataCommand(Guid entityId) : base(entityId) {
  296. }
  297. }
  298. [MessageType(description: "添加超频菜谱后")]
  299. public class OverClockDataAddedEvent : SourcedEvent<IOverClockData> {
  300. public OverClockDataAddedEvent(PathId targetPathId, IOverClockData source) : base(targetPathId, source) {
  301. }
  302. }
  303. [MessageType(description: "更新超频菜谱后")]
  304. public class OverClockDataUpdatedEvent : SourcedEvent<IOverClockData> {
  305. public OverClockDataUpdatedEvent(PathId targetPathId, IOverClockData source) : base(targetPathId, source) {
  306. }
  307. }
  308. [MessageType(description: "删除超频菜谱后")]
  309. public class OverClockDataRemovedEvent : SourcedEvent<IOverClockData> {
  310. public OverClockDataRemovedEvent(PathId targetPathId, IOverClockData source) : base(targetPathId, source) {
  311. }
  312. }
  313. [MessageType(description: "超频菜谱集初始化后")]
  314. public class OverClockDataSetInitedEvent : EventBase {
  315. public OverClockDataSetInitedEvent() {
  316. }
  317. }
  318. [MessageType(description: "NTMiner钱包集初始化后")]
  319. public class NTMinerWalletSetInitedEvent : EventBase {
  320. public NTMinerWalletSetInitedEvent() {
  321. }
  322. }
  323. #endregion
  324. #region gpu overclock
  325. [MessageType(description: "添加或更新Gpu超频数据")]
  326. public class AddOrUpdateGpuProfileCommand : Cmd {
  327. public AddOrUpdateGpuProfileCommand(IGpuProfile input) {
  328. this.Input = input;
  329. }
  330. public IGpuProfile Input { get; private set; }
  331. }
  332. [MessageType(description: "币种超频")]
  333. public class CoinOverClockCommand : Cmd {
  334. public CoinOverClockCommand(Guid coinId) {
  335. this.CoinId = coinId;
  336. }
  337. public Guid CoinId { get; private set; }
  338. }
  339. [MessageType(description: "币种超频完成后")]
  340. public class CoinOverClockDoneEvent : EventBase {
  341. public CoinOverClockDoneEvent(PathId targetPathId) : base(targetPathId) {
  342. }
  343. }
  344. [MessageType(description: "Gpu超频数据添加或更新后")]
  345. public class GpuProfileAddedOrUpdatedEvent : SourcedEvent<IGpuProfile> {
  346. public GpuProfileAddedOrUpdatedEvent(PathId targetPathId, IGpuProfile source) : base(targetPathId, source) {
  347. }
  348. }
  349. #endregion
  350. #region speed and share
  351. [MessageType(description: "显卡算力变更事件")]
  352. public class GpuSpeedChangedEvent : SourcedEvent<IGpuSpeed> {
  353. public GpuSpeedChangedEvent(bool isDual, PathId targetPathId, IGpuSpeed gpuSpeed) : base(targetPathId, gpuSpeed) {
  354. this.IsDual = isDual;
  355. }
  356. public bool IsDual { get; private set; }
  357. }
  358. [MessageType(description: "显卡份额变更事件")]
  359. public class GpuShareChangedEvent : SourcedEvent<IGpuSpeed> {
  360. public GpuShareChangedEvent(PathId targetPathId, IGpuSpeed gpuSpeed) : base(targetPathId, gpuSpeed) {
  361. }
  362. }
  363. [MessageType(description: "找到了一个份额")]
  364. public class FoundShareIncreasedEvent : SourcedEvent<IGpuSpeed> {
  365. public FoundShareIncreasedEvent(PathId targetPathId, IGpuSpeed gpuSpeed) : base(targetPathId, gpuSpeed) {
  366. }
  367. }
  368. [MessageType(description: "接受了一个份额")]
  369. public class AcceptShareIncreasedEvent : SourcedEvent<IGpuSpeed> {
  370. public AcceptShareIncreasedEvent(PathId targetPathId, IGpuSpeed gpuSpeed) : base(targetPathId, gpuSpeed) {
  371. }
  372. }
  373. [MessageType(description: "拒绝了一个份额")]
  374. public class RejectShareIncreasedEvent : SourcedEvent<IGpuSpeed> {
  375. public RejectShareIncreasedEvent(PathId targetPathId, IGpuSpeed gpuSpeed) : base(targetPathId, gpuSpeed) {
  376. }
  377. }
  378. [MessageType(description: "算错了一个份额")]
  379. public class IncorrectShareIncreasedEvent : SourcedEvent<IGpuSpeed> {
  380. public IncorrectShareIncreasedEvent(PathId targetPathId, IGpuSpeed gpuSpeed) : base(targetPathId, gpuSpeed) {
  381. }
  382. }
  383. [MessageType(description: "收益变更事件")]
  384. public class ShareChangedEvent : SourcedEvent<ICoinShare> {
  385. public ShareChangedEvent(PathId targetPathId, ICoinShare share) : base(targetPathId, share) {
  386. }
  387. }
  388. #endregion
  389. #region Gpu Messages
  390. [MessageType(description: "显卡状态变更事件", isCanNoPath: true)]
  391. public class GpuStateChangedEvent : SourcedEvent<IGpu> {
  392. public GpuStateChangedEvent(PathId targetPathId, IGpu source) : base(targetPathId, source) {
  393. }
  394. }
  395. #endregion
  396. #region SysDic Messages
  397. [MessageType(description: "添加系统字典")]
  398. public class AddSysDicCommand : AddEntityCommand<ISysDic> {
  399. public AddSysDicCommand(ISysDic input) : base(input) {
  400. }
  401. }
  402. [MessageType(description: "更新系统字典")]
  403. public class UpdateSysDicCommand : UpdateEntityCommand<ISysDic> {
  404. public UpdateSysDicCommand(ISysDic input) : base(input) {
  405. }
  406. }
  407. [MessageType(description: "删除系统字典")]
  408. public class RemoveSysDicCommand : RemoveEntityCommand {
  409. public RemoveSysDicCommand(Guid entityId) : base(entityId) {
  410. }
  411. }
  412. [MessageType(description: "添加系统字典后")]
  413. public class SysDicAddedEvent : SourcedEvent<ISysDic> {
  414. public SysDicAddedEvent(PathId targetPathId, ISysDic source) : base(targetPathId, source) {
  415. }
  416. }
  417. [MessageType(description: "更新系统字典后")]
  418. public class SysDicUpdatedEvent : SourcedEvent<ISysDic> {
  419. public SysDicUpdatedEvent(PathId targetPathId, ISysDic source) : base(targetPathId, source) {
  420. }
  421. }
  422. [MessageType(description: "删除系统字典后")]
  423. public class SysDicRemovedEvent : SourcedEvent<ISysDic> {
  424. public SysDicRemovedEvent(PathId targetPathId, ISysDic source) : base(targetPathId, source) {
  425. }
  426. }
  427. #endregion
  428. #region SysDicItem Messages
  429. [MessageType(description: "添加系统字典项")]
  430. public class AddSysDicItemCommand : AddEntityCommand<ISysDicItem> {
  431. public AddSysDicItemCommand(ISysDicItem input) : base(input) {
  432. }
  433. }
  434. [MessageType(description: "更新系统字典项")]
  435. public class UpdateSysDicItemCommand : UpdateEntityCommand<ISysDicItem> {
  436. public UpdateSysDicItemCommand(ISysDicItem input) : base(input) {
  437. }
  438. }
  439. [MessageType(description: "移除系统字典项")]
  440. public class RemoveSysDicItemCommand : RemoveEntityCommand {
  441. public RemoveSysDicItemCommand(Guid entityId) : base(entityId) {
  442. }
  443. }
  444. [MessageType(description: "添加了系统字典项后")]
  445. public class SysDicItemAddedEvent : SourcedEvent<ISysDicItem> {
  446. public SysDicItemAddedEvent(PathId targetPathId, ISysDicItem source) : base(targetPathId, source) {
  447. }
  448. }
  449. [MessageType(description: "更新了系统字典项后")]
  450. public class SysDicItemUpdatedEvent : SourcedEvent<ISysDicItem> {
  451. public SysDicItemUpdatedEvent(PathId targetPathId, ISysDicItem source) : base(targetPathId, source) {
  452. }
  453. }
  454. [MessageType(description: "删除了系统字典项后")]
  455. public class SysDicItemRemovedEvent : SourcedEvent<ISysDicItem> {
  456. public SysDicItemRemovedEvent(PathId targetPathId, ISysDicItem source) : base(targetPathId, source) {
  457. }
  458. }
  459. #endregion
  460. #region Coin Messages
  461. [MessageType(description: "添加币种")]
  462. public class AddCoinCommand : AddEntityCommand<ICoin> {
  463. public AddCoinCommand(ICoin input) : base(input) {
  464. }
  465. }
  466. [MessageType(description: "更新币种")]
  467. public class UpdateCoinCommand : UpdateEntityCommand<ICoin> {
  468. public UpdateCoinCommand(ICoin input) : base(input) {
  469. }
  470. }
  471. [MessageType(description: "移除币种")]
  472. public class RemoveCoinCommand : RemoveEntityCommand {
  473. public RemoveCoinCommand(Guid entityId) : base(entityId) {
  474. }
  475. }
  476. [MessageType(description: "添加了币种后")]
  477. public class CoinAddedEvent : SourcedEvent<ICoin> {
  478. public CoinAddedEvent(PathId targetPathId, ICoin source) : base(targetPathId, source) {
  479. }
  480. }
  481. [MessageType(description: "更新了币种后")]
  482. public class CoinUpdatedEvent : SourcedEvent<ICoin> {
  483. public CoinUpdatedEvent(PathId targetPathId, ICoin source) : base(targetPathId, source) {
  484. }
  485. }
  486. [MessageType(description: "移除了币种后")]
  487. public class CoinRemovedEvent : SourcedEvent<ICoin> {
  488. public CoinRemovedEvent(PathId targetPathId, ICoin source) : base(targetPathId, source) {
  489. }
  490. }
  491. [MessageType(description: "下载了币种图标后")]
  492. public class CoinIconDownloadedEvent : SourcedEvent<ICoin> {
  493. public CoinIconDownloadedEvent(PathId targetPathId, ICoin source) : base(targetPathId, source) {
  494. }
  495. }
  496. #endregion
  497. #region Group Messages
  498. [MessageType(description: "添加组")]
  499. public class AddGroupCommand : AddEntityCommand<IGroup> {
  500. public AddGroupCommand(IGroup input) : base(input) {
  501. }
  502. }
  503. [MessageType(description: "更新组")]
  504. public class UpdateGroupCommand : UpdateEntityCommand<IGroup> {
  505. public UpdateGroupCommand(IGroup input) : base(input) {
  506. }
  507. }
  508. [MessageType(description: "移除组")]
  509. public class RemoveGroupCommand : RemoveEntityCommand {
  510. public RemoveGroupCommand(Guid entityId) : base(entityId) {
  511. }
  512. }
  513. [MessageType(description: "添加了组后")]
  514. public class GroupAddedEvent : SourcedEvent<IGroup> {
  515. public GroupAddedEvent(PathId targetPathId, IGroup source) : base(targetPathId, source) {
  516. }
  517. }
  518. [MessageType(description: "更新了组后")]
  519. public class GroupUpdatedEvent : SourcedEvent<IGroup> {
  520. public GroupUpdatedEvent(PathId targetPathId, IGroup source) : base(targetPathId, source) {
  521. }
  522. }
  523. [MessageType(description: "移除了组后")]
  524. public class GroupRemovedEvent : SourcedEvent<IGroup> {
  525. public GroupRemovedEvent(PathId targetPathId, IGroup source) : base(targetPathId, source) {
  526. }
  527. }
  528. #endregion
  529. #region CoinGroup Messages
  530. [MessageType(description: "添加币组")]
  531. public class AddCoinGroupCommand : AddEntityCommand<ICoinGroup> {
  532. public AddCoinGroupCommand(ICoinGroup input) : base(input) {
  533. }
  534. }
  535. [MessageType(description: "修改币组")]
  536. public class UpdateCoinGroupCommand : UpdateEntityCommand<ICoinGroup> {
  537. public UpdateCoinGroupCommand(ICoinGroup input) : base(input) {
  538. }
  539. }
  540. [MessageType(description: "移除币组")]
  541. public class RemoveCoinGroupCommand : RemoveEntityCommand {
  542. public RemoveCoinGroupCommand(Guid entityId) : base(entityId) {
  543. }
  544. }
  545. [MessageType(description: "添加了币组后")]
  546. public class CoinGroupAddedEvent : SourcedEvent<ICoinGroup> {
  547. public CoinGroupAddedEvent(PathId targetPathId, ICoinGroup source) : base(targetPathId, source) {
  548. }
  549. }
  550. [MessageType(description: "移除了币组后")]
  551. public class CoinGroupRemovedEvent : SourcedEvent<ICoinGroup> {
  552. public CoinGroupRemovedEvent(PathId targetPathId, ICoinGroup source) : base(targetPathId, source) {
  553. }
  554. }
  555. #endregion
  556. #region FileWriter Messages
  557. [MessageType(description: "添加文件书写器")]
  558. public class AddFileWriterCommand : AddEntityCommand<IFileWriter> {
  559. public AddFileWriterCommand(IFileWriter input) : base(input) {
  560. }
  561. }
  562. [MessageType(description: "更新文件书写器")]
  563. public class UpdateFileWriterCommand : UpdateEntityCommand<IFileWriter> {
  564. public UpdateFileWriterCommand(IFileWriter input) : base(input) {
  565. }
  566. }
  567. [MessageType(description: "移除文件书写器")]
  568. public class RemoveFileWriterCommand : RemoveEntityCommand {
  569. public RemoveFileWriterCommand(Guid entityId) : base(entityId) {
  570. }
  571. }
  572. [MessageType(description: "添加了文件书写器后")]
  573. public class FileWriterAddedEvent : SourcedEvent<IFileWriter> {
  574. public FileWriterAddedEvent(PathId targetPathId, IFileWriter source) : base(targetPathId, source) {
  575. }
  576. }
  577. [MessageType(description: "更新了文件书写器后")]
  578. public class FileWriterUpdatedEvent : SourcedEvent<IFileWriter> {
  579. public FileWriterUpdatedEvent(PathId targetPathId, IFileWriter source) : base(targetPathId, source) {
  580. }
  581. }
  582. [MessageType(description: "移除了文件书写器后")]
  583. public class FileWriterRemovedEvent : SourcedEvent<IFileWriter> {
  584. public FileWriterRemovedEvent(PathId targetPathId, IFileWriter source) : base(targetPathId, source) {
  585. }
  586. }
  587. #endregion
  588. #region FragmentWriter Messages
  589. [MessageType(description: "添加命令行片段书写器")]
  590. public class AddFragmentWriterCommand : AddEntityCommand<IFragmentWriter> {
  591. public AddFragmentWriterCommand(IFragmentWriter input) : base(input) {
  592. }
  593. }
  594. [MessageType(description: "更新命令行片段书写器")]
  595. public class UpdateFragmentWriterCommand : UpdateEntityCommand<IFragmentWriter> {
  596. public UpdateFragmentWriterCommand(IFragmentWriter input) : base(input) {
  597. }
  598. }
  599. [MessageType(description: "移除命令行片段书写器")]
  600. public class RemoveFragmentWriterCommand : RemoveEntityCommand {
  601. public RemoveFragmentWriterCommand(Guid entityId) : base(entityId) {
  602. }
  603. }
  604. [MessageType(description: "添加了命令行片段书写器后")]
  605. public class FragmentWriterAddedEvent : SourcedEvent<IFragmentWriter> {
  606. public FragmentWriterAddedEvent(PathId targetPathId, IFragmentWriter source) : base(targetPathId, source) {
  607. }
  608. }
  609. [MessageType(description: "更新了命令行片段书写器后")]
  610. public class FragmentWriterUpdatedEvent : SourcedEvent<IFragmentWriter> {
  611. public FragmentWriterUpdatedEvent(PathId targetPathId, IFragmentWriter source) : base(targetPathId, source) {
  612. }
  613. }
  614. [MessageType(description: "移除了命令行片段书写器后")]
  615. public class FragmentWriterRemovedEvent : SourcedEvent<IFragmentWriter> {
  616. public FragmentWriterRemovedEvent(PathId targetPathId, IFragmentWriter source) : base(targetPathId, source) {
  617. }
  618. }
  619. #endregion
  620. #region Wallet Messages
  621. [MessageType(description: "添加钱包")]
  622. public class AddWalletCommand : AddEntityCommand<IWallet> {
  623. public AddWalletCommand(IWallet input) : base(input) {
  624. }
  625. }
  626. [MessageType(description: "更新钱包")]
  627. public class UpdateWalletCommand : UpdateEntityCommand<IWallet> {
  628. public UpdateWalletCommand(IWallet input) : base(input) {
  629. }
  630. }
  631. [MessageType(description: "移除钱包")]
  632. public class RemoveWalletCommand : RemoveEntityCommand {
  633. public RemoveWalletCommand(Guid entityId) : base(entityId) {
  634. }
  635. }
  636. [MessageType(description: "添加了钱包后")]
  637. public class WalletAddedEvent : SourcedEvent<IWallet> {
  638. public WalletAddedEvent(PathId targetPathId, IWallet source) : base(targetPathId, source) {
  639. }
  640. }
  641. [MessageType(description: "更新了钱包后")]
  642. public class WalletUpdatedEvent : SourcedEvent<IWallet> {
  643. public WalletUpdatedEvent(PathId targetPathId, IWallet source) : base(targetPathId, source) {
  644. }
  645. }
  646. [MessageType(description: "移除了钱包后")]
  647. public class WalletRemovedEvent : SourcedEvent<IWallet> {
  648. public WalletRemovedEvent(PathId targetPathId, IWallet source) : base(targetPathId, source) {
  649. }
  650. }
  651. #endregion
  652. #region Pool Messages
  653. [MessageType(description: "添加矿池")]
  654. public class AddPoolCommand : AddEntityCommand<IPool> {
  655. public AddPoolCommand(IPool input) : base(input) {
  656. }
  657. }
  658. [MessageType(description: "更新矿池")]
  659. public class UpdatePoolCommand : UpdateEntityCommand<IPool> {
  660. public UpdatePoolCommand(IPool input) : base(input) {
  661. }
  662. }
  663. [MessageType(description: "移除矿池")]
  664. public class RemovePoolCommand : RemoveEntityCommand {
  665. public RemovePoolCommand(Guid entityId) : base(entityId) {
  666. }
  667. }
  668. [MessageType(description: "添加了矿池后")]
  669. public class PoolAddedEvent : SourcedEvent<IPool> {
  670. public PoolAddedEvent(PathId targetPathId, IPool source) : base(targetPathId, source) {
  671. }
  672. }
  673. [MessageType(description: "更新了矿池后")]
  674. public class PoolUpdatedEvent : SourcedEvent<IPool> {
  675. public PoolUpdatedEvent(PathId targetPathId, IPool source) : base(targetPathId, source) {
  676. }
  677. }
  678. [MessageType(description: "移除了矿池后")]
  679. public class PoolRemovedEvent : SourcedEvent<IPool> {
  680. public PoolRemovedEvent(PathId targetPathId, IPool source) : base(targetPathId, source) {
  681. }
  682. }
  683. #endregion
  684. #region CoinKernel Messages
  685. [MessageType(description: "添加币种级内核")]
  686. public class AddCoinKernelCommand : AddEntityCommand<ICoinKernel> {
  687. public AddCoinKernelCommand(ICoinKernel input) : base(input) {
  688. }
  689. }
  690. [MessageType(description: "更新币种级内核")]
  691. public class UpdateCoinKernelCommand : UpdateEntityCommand<ICoinKernel> {
  692. public UpdateCoinKernelCommand(ICoinKernel input) : base(input) {
  693. }
  694. }
  695. [MessageType(description: "移除币种级内核")]
  696. public class RemoveCoinKernelCommand : RemoveEntityCommand {
  697. public RemoveCoinKernelCommand(Guid entityId) : base(entityId) {
  698. }
  699. }
  700. [MessageType(description: "添加了币种级内核后")]
  701. public class CoinKernelAddedEvent : SourcedEvent<ICoinKernel> {
  702. public CoinKernelAddedEvent(PathId targetPathId, ICoinKernel source) : base(targetPathId, source) {
  703. }
  704. }
  705. [MessageType(description: "更新了币种级内核后")]
  706. public class CoinKernelUpdatedEvent : SourcedEvent<ICoinKernel> {
  707. public CoinKernelUpdatedEvent(PathId targetPathId, ICoinKernel source) : base(targetPathId, source) {
  708. }
  709. }
  710. [MessageType(description: "移除了币种级内核后")]
  711. public class CoinKernelRemovedEvent : SourcedEvent<ICoinKernel> {
  712. public CoinKernelRemovedEvent(PathId targetPathId, ICoinKernel source) : base(targetPathId, source) {
  713. }
  714. }
  715. #endregion
  716. #region PoolKernel Messages
  717. [MessageType(description: "添加矿池级内核")]
  718. public class AddPoolKernelCommand : UpdateEntityCommand<IPoolKernel> {
  719. public AddPoolKernelCommand(IPoolKernel input) : base(input) {
  720. }
  721. }
  722. [MessageType(description: "更新矿池级内核")]
  723. public class UpdatePoolKernelCommand : UpdateEntityCommand<IPoolKernel> {
  724. public UpdatePoolKernelCommand(IPoolKernel input) : base(input) {
  725. }
  726. }
  727. [MessageType(description: "移除矿池级内核")]
  728. public class RemovePoolKernelCommand : RemoveEntityCommand {
  729. public RemovePoolKernelCommand(Guid entityId) : base(entityId) {
  730. }
  731. }
  732. [MessageType(description: "添加了矿池级内核后")]
  733. public class PoolKernelAddedEvent : SourcedEvent<IPoolKernel> {
  734. public PoolKernelAddedEvent(PathId targetPathId, IPoolKernel source) : base(targetPathId, source) {
  735. }
  736. }
  737. [MessageType(description: "更新了矿池级内核后")]
  738. public class PoolKernelUpdatedEvent : SourcedEvent<IPoolKernel> {
  739. public PoolKernelUpdatedEvent(PathId targetPathId, IPoolKernel source) : base(targetPathId, source) {
  740. }
  741. }
  742. [MessageType(description: "移除了矿池级内核后")]
  743. public class PoolKernelRemovedEvent : SourcedEvent<IPoolKernel> {
  744. public PoolKernelRemovedEvent(PathId targetPathId, IPoolKernel source) : base(targetPathId, source) {
  745. }
  746. }
  747. #endregion
  748. #region Package Messages
  749. [MessageType(description: "添加包")]
  750. public class AddPackageCommand : AddEntityCommand<IPackage> {
  751. public AddPackageCommand(IPackage input) : base(input) {
  752. }
  753. }
  754. [MessageType(description: "更新包")]
  755. public class UpdatePackageCommand : UpdateEntityCommand<IPackage> {
  756. public UpdatePackageCommand(IPackage input) : base(input) {
  757. }
  758. }
  759. [MessageType(description: "删除包")]
  760. public class RemovePackageCommand : RemoveEntityCommand {
  761. public RemovePackageCommand(Guid entityId) : base(entityId) {
  762. }
  763. }
  764. [MessageType(description: "添加了包后")]
  765. public class PackageAddedEvent : SourcedEvent<IPackage> {
  766. public PackageAddedEvent(PathId targetPathId, IPackage source) : base(targetPathId, source) {
  767. }
  768. }
  769. [MessageType(description: "更新了包后")]
  770. public class PackageUpdatedEvent : SourcedEvent<IPackage> {
  771. public PackageUpdatedEvent(PathId targetPathId, IPackage source) : base(targetPathId, source) {
  772. }
  773. }
  774. [MessageType(description: "删除了包后")]
  775. public class PackageRemovedEvent : SourcedEvent<IPackage> {
  776. public PackageRemovedEvent(PathId targetPathId, IPackage source) : base(targetPathId, source) {
  777. }
  778. }
  779. #endregion
  780. #region Kernel Messages
  781. [MessageType(description: "添加内核")]
  782. public class AddKernelCommand : AddEntityCommand<IKernel> {
  783. public AddKernelCommand(IKernel input) : base(input) {
  784. }
  785. }
  786. [MessageType(description: "更新内核")]
  787. public class UpdateKernelCommand : UpdateEntityCommand<IKernel> {
  788. public UpdateKernelCommand(IKernel input) : base(input) {
  789. }
  790. }
  791. [MessageType(description: "删除内核")]
  792. public class RemoveKernelCommand : RemoveEntityCommand {
  793. public RemoveKernelCommand(Guid entityId) : base(entityId) {
  794. }
  795. }
  796. [MessageType(description: "添加了内核后")]
  797. public class KernelAddedEvent : SourcedEvent<IKernel> {
  798. public KernelAddedEvent(PathId targetPathId, IKernel source) : base(targetPathId, source) {
  799. }
  800. }
  801. [MessageType(description: "更新了内核后")]
  802. public class KernelUpdatedEvent : SourcedEvent<IKernel> {
  803. public KernelUpdatedEvent(PathId targetPathId, IKernel source) : base(targetPathId, source) {
  804. }
  805. }
  806. [MessageType(description: "删除了内核后")]
  807. public class KernelRemovedEvent : SourcedEvent<IKernel> {
  808. public KernelRemovedEvent(PathId targetPathId, IKernel source) : base(targetPathId, source) {
  809. }
  810. }
  811. #endregion
  812. #region KernelInput Messages
  813. [MessageType(description: "添加内核输入组")]
  814. public class AddKernelInputCommand : AddEntityCommand<IKernelInput> {
  815. public AddKernelInputCommand(IKernelInput input) : base(input) {
  816. }
  817. }
  818. [MessageType(description: "更新内核输入组")]
  819. public class UpdateKernelInputCommand : UpdateEntityCommand<IKernelInput> {
  820. public UpdateKernelInputCommand(IKernelInput input) : base(input) {
  821. }
  822. }
  823. [MessageType(description: "移除内核输入组")]
  824. public class RemoveKernelInputCommand : RemoveEntityCommand {
  825. public RemoveKernelInputCommand(Guid entityId) : base(entityId) {
  826. }
  827. }
  828. [MessageType(description: "添加了内核输入组后")]
  829. public class KernelInputAddedEvent : SourcedEvent<IKernelInput> {
  830. public KernelInputAddedEvent(PathId targetPathId, IKernelInput source) : base(targetPathId, source) {
  831. }
  832. }
  833. [MessageType(description: "更新了内核输入组后")]
  834. public class KernelInputUpdatedEvent : SourcedEvent<IKernelInput> {
  835. public KernelInputUpdatedEvent(PathId targetPathId, IKernelInput source) : base(targetPathId, source) {
  836. }
  837. }
  838. [MessageType(description: "移除了内核输入组后")]
  839. public class KernelInputRemovedEvent : SourcedEvent<IKernelInput> {
  840. public KernelInputRemovedEvent(PathId targetPathId, IKernelInput source) : base(targetPathId, source) {
  841. }
  842. }
  843. #endregion
  844. #region KernelOutput Messages
  845. [MessageType(description: "添加内核输出组")]
  846. public class AddKernelOutputCommand : AddEntityCommand<IKernelOutput> {
  847. public AddKernelOutputCommand(IKernelOutput input) : base(input) {
  848. }
  849. }
  850. [MessageType(description: "更新内核输出组")]
  851. public class UpdateKernelOutputCommand : UpdateEntityCommand<IKernelOutput> {
  852. public UpdateKernelOutputCommand(IKernelOutput input) : base(input) {
  853. }
  854. }
  855. [MessageType(description: "移除内核输出组")]
  856. public class RemoveKernelOutputCommand : RemoveEntityCommand {
  857. public RemoveKernelOutputCommand(Guid entityId) : base(entityId) {
  858. }
  859. }
  860. [MessageType(description: "添加了内核输出组后")]
  861. public class KernelOutputAddedEvent : SourcedEvent<IKernelOutput> {
  862. public KernelOutputAddedEvent(PathId targetPathId, IKernelOutput source) : base(targetPathId, source) {
  863. }
  864. }
  865. [MessageType(description: "更新了内核输出组后")]
  866. public class KernelOutputUpdatedEvent : SourcedEvent<IKernelOutput> {
  867. public KernelOutputUpdatedEvent(PathId targetPathId, IKernelOutput source) : base(targetPathId, source) {
  868. }
  869. }
  870. [MessageType(description: "移除了内核输出组后")]
  871. public class KernelOutputRemovedEvent : SourcedEvent<IKernelOutput> {
  872. public KernelOutputRemovedEvent(PathId targetPathId, IKernelOutput source) : base(targetPathId, source) {
  873. }
  874. }
  875. #endregion
  876. #region KernelOutputTranslater Messages
  877. [MessageType(description: "添加内核输出翻译器")]
  878. public class AddKernelOutputTranslaterCommand : AddEntityCommand<IKernelOutputTranslater> {
  879. public AddKernelOutputTranslaterCommand(IKernelOutputTranslater input) : base(input) {
  880. }
  881. }
  882. [MessageType(description: "更新内核输出翻译器")]
  883. public class UpdateKernelOutputTranslaterCommand : UpdateEntityCommand<IKernelOutputTranslater> {
  884. public UpdateKernelOutputTranslaterCommand(IKernelOutputTranslater input) : base(input) {
  885. }
  886. }
  887. [MessageType(description: "移除内核输出翻译器")]
  888. public class RemoveKernelOutputTranslaterCommand : RemoveEntityCommand {
  889. public RemoveKernelOutputTranslaterCommand(Guid entityId) : base(entityId) {
  890. }
  891. }
  892. [MessageType(description: "添加了内核输出翻译器后")]
  893. public class KernelOutputTranslaterAddedEvent : SourcedEvent<IKernelOutputTranslater> {
  894. public KernelOutputTranslaterAddedEvent(PathId targetPathId, IKernelOutputTranslater source) : base(targetPathId, source) {
  895. }
  896. }
  897. [MessageType(description: "更新了内核输出翻译器后")]
  898. public class KernelOutputTranslaterUpdatedEvent : SourcedEvent<IKernelOutputTranslater> {
  899. public KernelOutputTranslaterUpdatedEvent(PathId targetPathId, IKernelOutputTranslater source) : base(targetPathId, source) {
  900. }
  901. }
  902. [MessageType(description: "移除了内核输出翻译器后")]
  903. public class KernelOutputTranslaterRemovedEvent : SourcedEvent<IKernelOutputTranslater> {
  904. public KernelOutputTranslaterRemovedEvent(PathId targetPathId, IKernelOutputTranslater source) : base(targetPathId, source) {
  905. }
  906. }
  907. #endregion
  908. #region MineWork Messages
  909. [MessageType(description: "添加作业")]
  910. public class AddMineWorkCommand : AddEntityCommand<IMineWork> {
  911. public AddMineWorkCommand(IMineWork input) : base(input) {
  912. }
  913. }
  914. [MessageType(description: "更新作业")]
  915. public class UpdateMineWorkCommand : UpdateEntityCommand<IMineWork> {
  916. public UpdateMineWorkCommand(IMineWork input) : base(input) {
  917. }
  918. }
  919. [MessageType(description: "移除作业")]
  920. public class RemoveMineWorkCommand : RemoveEntityCommand {
  921. public RemoveMineWorkCommand(Guid entityId) : base(entityId) {
  922. }
  923. }
  924. [MessageType(description: "添加了作业后")]
  925. public class MineWorkAddedEvent : SourcedEvent<IMineWork> {
  926. public MineWorkAddedEvent(PathId targetPathId, IMineWork source) : base(targetPathId, source) {
  927. }
  928. }
  929. [MessageType(description: "更新了作业后")]
  930. public class MineWorkUpdatedEvent : SourcedEvent<IMineWork> {
  931. public MineWorkUpdatedEvent(PathId targetPathId, IMineWork source) : base(targetPathId, source) {
  932. }
  933. }
  934. [MessageType(description: "移除了作业后")]
  935. public class MineWorkRemovedEvent : SourcedEvent<IMineWork> {
  936. public MineWorkRemovedEvent(PathId targetPathId, IMineWork source) : base(targetPathId, source) {
  937. }
  938. }
  939. [MessageType(description: "外网群控作业集初始化后")]
  940. public class MineWorkSetInitedEvent : EventBase {
  941. public MineWorkSetInitedEvent() { }
  942. }
  943. #endregion
  944. #region MineGroup Messages
  945. [MessageType(description: "添加矿机组")]
  946. public class AddMinerGroupCommand : AddEntityCommand<IMinerGroup> {
  947. public AddMinerGroupCommand(IMinerGroup input) : base(input) {
  948. }
  949. }
  950. [MessageType(description: "更新矿机组")]
  951. public class UpdateMinerGroupCommand : UpdateEntityCommand<IMinerGroup> {
  952. public UpdateMinerGroupCommand(IMinerGroup input) : base(input) {
  953. }
  954. }
  955. [MessageType(description: "移除矿机组")]
  956. public class RemoveMinerGroupCommand : RemoveEntityCommand {
  957. public RemoveMinerGroupCommand(Guid entityId) : base(entityId) {
  958. }
  959. }
  960. [MessageType(description: "添加了矿机组后")]
  961. public class MinerGroupAddedEvent : SourcedEvent<IMinerGroup> {
  962. public MinerGroupAddedEvent(PathId targetPathId, IMinerGroup source) : base(targetPathId, source) {
  963. }
  964. }
  965. [MessageType(description: "更新了矿机组后")]
  966. public class MinerGroupUpdatedEvent : SourcedEvent<IMinerGroup> {
  967. public MinerGroupUpdatedEvent(PathId targetPathId, IMinerGroup source) : base(targetPathId, source) {
  968. }
  969. }
  970. [MessageType(description: "移除了矿机组后")]
  971. public class MinerGroupRemovedEvent : SourcedEvent<IMinerGroup> {
  972. public MinerGroupRemovedEvent(PathId targetPathId, IMinerGroup source) : base(targetPathId, source) {
  973. }
  974. }
  975. [MessageType(description: "外网群控矿工组集初始化后")]
  976. public class MinerGroupSetInitedEvent : EventBase {
  977. public MinerGroupSetInitedEvent() { }
  978. }
  979. #endregion
  980. #region ColumnsShow Messages
  981. [MessageType(description: "添加或修改了列分组后")]
  982. public class ColumnsShowAddedOrUpdatedEvent : SourcedEvent<IColumnsShow> {
  983. public ColumnsShowAddedOrUpdatedEvent(PathId targetPathId, IColumnsShow source) : base(targetPathId, source) {
  984. }
  985. }
  986. [MessageType(description: "删除了列分组后")]
  987. public class ColumnsRemovedEvent : SourcedEvent<IColumnsShow> {
  988. public ColumnsRemovedEvent(PathId targetPathId, IColumnsShow source) : base(targetPathId, source) { }
  989. }
  990. #endregion
  991. #region User Messages
  992. [MessageType(description: "启用了用户后")]
  993. public class UserEnabledEvent : SourcedEvent<IUser> {
  994. public UserEnabledEvent(PathId targetPathId, IUser source) : base(targetPathId, source) {
  995. }
  996. }
  997. [MessageType(description: "禁用了用户后")]
  998. public class UserDisabledEvent : SourcedEvent<IUser> {
  999. public UserDisabledEvent(PathId targetPathId, IUser source) : base(targetPathId, source) {
  1000. }
  1001. }
  1002. #endregion
  1003. [MessageType(description: "用户设置数据集变更后")]
  1004. public class UserAppSettingSetInitedEvent : EventBase {
  1005. public UserAppSettingSetInitedEvent() { }
  1006. }
  1007. }