Messages.cs 36 KB

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