初始化上传
This commit is contained in:
31
常用工具集/Utility/EventBus/ReciveMessageEvent.cs
Normal file
31
常用工具集/Utility/EventBus/ReciveMessageEvent.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using MES.Utility.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Weiz.EventBus.Core;
|
||||
|
||||
namespace MES.Utility.EventBus
|
||||
{
|
||||
public class ReciveMessageEvent : IEvent
|
||||
{
|
||||
public ReciveMessageEvent() { }
|
||||
public ReciveMessageEvent(byte[] data)
|
||||
{
|
||||
Data = data;
|
||||
}
|
||||
|
||||
public byte[] Data { get; set; }
|
||||
|
||||
public string DataHexString
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Data == null)
|
||||
return string.Empty;
|
||||
return Data.Select(it => Convert.ToString(it, 16).PadLeft(2, '0').ToUpper()).ToList().GetStrArray(" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user