public byte[] Serialize(ChangeNodeState @event) => TextConvert.ToUTF8ByteArray($"{@event.NodeId}{@event.ActionType}");
public virtual byte[] Serialize(string value) => TextConvert.ToUTF8ByteArray(value);
public byte[] Serialize(StateChanged @event) { string data = @event.Value.ToString(); return(TextConvert.ToUTF8ByteArray(data)); }
public byte[] Serialize(MyEvent value) { string data = string.Format($"{value.Status}{value.Status}"); return(TextConvert.ToUTF8ByteArray(data)); }
public byte[] Serialize(StatusChanged @event) => TextConvert.ToUTF8ByteArray(Convert.ToString(@event.Value));
public byte[] Serialize(T value) { var data = JsonConvert.SerializeObject(value); return(TextConvert.ToUTF8ByteArray(data)); }