Messages.cs 45 KB

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