public byte[] Serialize(ChangeNodeState @event)
 => TextConvert.ToUTF8ByteArray($"{@event.NodeId}{@event.ActionType}");
Exemplo n.º 2
0
 public virtual byte[] Serialize(string value) => TextConvert.ToUTF8ByteArray(value);
Exemplo n.º 3
0
        public byte[] Serialize(StateChanged @event)
        {
            string data = @event.Value.ToString();

            return(TextConvert.ToUTF8ByteArray(data));
        }
Exemplo n.º 4
0
        public byte[] Serialize(MyEvent value)
        {
            string data = string.Format($"{value.Status}{value.Status}");

            return(TextConvert.ToUTF8ByteArray(data));
        }
Exemplo n.º 5
0
 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));
        }