public static string ToDebuggedHex(this ISerializedType st) { BytesList list = new BytesList(); st.ToBytes(list); return(list.RawList().Aggregate("", (a, b) = \ > \ a + ',' + B16.Encode(b))); }
public static string ToHex(this ISerializedType st) { BytesList list = new BytesList(); st.ToBytes(list); return(list.BytesHex()); }
public void AddLengthEncoded(ISerializedType value) { var bytes = new BytesList(); value.ToBytes(bytes); AddLengthEncoded(bytes); }
public void Add(Field field, ISerializedType value) { AddFieldHeader(field); if (field.IsVlEncoded) { AddLengthEncoded(value); } else { value.ToBytes(_sink); if (field.Type == FieldType.StObject) { AddFieldHeader(Field.ObjectEndMarker); } else if (field.Type == FieldType.StArray) { AddFieldHeader(Field.ArrayEndMarker); } } }