Beispiel #1
0
 public virtual void WriteToStreamDelta(Stream stream, WorldItem previous)
 {
     if (previous == null)
     {
         WorldItem.Serialize(stream, this);
         return;
     }
     WorldItem.SerializeDelta(stream, this, previous);
 }
Beispiel #2
0
 public static byte[] SerializeToBytes(WorldItem instance)
 {
     byte[] array;
     using (MemoryStream memoryStream = new MemoryStream())
     {
         WorldItem.Serialize(memoryStream, instance);
         array = memoryStream.ToArray();
     }
     return(array);
 }
Beispiel #3
0
 public virtual void WriteToStream(Stream stream)
 {
     WorldItem.Serialize(stream, this);
 }
Beispiel #4
0
 public void ToProto(Stream stream)
 {
     WorldItem.Serialize(stream, this);
 }