public void Write(IObjectDataOutput output, CustomSerializableType t) { var array = Encoding.UTF8.GetBytes(t.Value); output.Write(array.Length); output.WriteBytes(array); }
public void Write(IObjectDataOutput output, CustomSerializableType t) { byte[] array; var bf = new BinaryFormatter(); using (var ms = new MemoryStream()) { bf.Serialize(ms, t); array = ms.ToArray(); } output.Write(array.Length); output.WriteBytes(array); }
public void WriteData(IObjectDataOutput output) { output.Write(_data.Length); output.WriteBytes(_data); }