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

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

            return(TextConvert.ToUTF8ByteArray(data));
        }
예제 #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));
        }