public virtual void WriteToStreamDelta(Stream stream, BaseResource previous) { if (previous == null) { BaseResource.Serialize(stream, this); return; } BaseResource.SerializeDelta(stream, this, previous); }
public static byte[] SerializeToBytes(BaseResource instance) { byte[] array; using (MemoryStream memoryStream = new MemoryStream()) { BaseResource.Serialize(memoryStream, instance); array = memoryStream.ToArray(); } return(array); }
public virtual void WriteToStream(Stream stream) { BaseResource.Serialize(stream, this); }
public void ToProto(Stream stream) { BaseResource.Serialize(stream, this); }