public override void Serialize(ProtobufSerializer serializer) { serializer.Write(Time); serializer.Write(Season); serializer.Write(Weather); serializer.Write(Event); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(Message); serializer.Write(Type); /* * Battle.ToStream(serializer); */ }
public void GivenDocumentsWhenWrittenAndReadThenDocumentsIsReturned() { var documents = new Documents { WorkItems = new List <WorkItem> { new WorkItem { BoundaryId = 5 } }, WorkItemOperations = new List <WorkItemOperation> { new WorkItemOperation { Description = "Hello" } }, LoggedData = new List <LoggedData> { new LoggedData { OperationData = new List <OperationData> { new OperationData() } }, }, }; var filePath = Path.Combine(_testCardPath, "adm", "document.adm"); _protobufSerializer.Write(filePath, documents); var documentsIn = _protobufSerializer.Read <Documents>(filePath); Assert.AreEqual(documents.WorkItems.First().BoundaryId, documentsIn.WorkItems.First().BoundaryId); Assert.AreEqual(documents.WorkItemOperations.First().Description, documentsIn.WorkItemOperations.First().Description); Assert.AreEqual(documents.LoggedData.First().Id.ReferenceId, documentsIn.LoggedData.First().Id.ReferenceId); Assert.AreEqual(documents.LoggedData.First().OperationData.First().Id.ReferenceId, documentsIn.LoggedData.First().OperationData.First().Id.ReferenceId); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(BattleState); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(SharedSecret); serializer.Write(VerificationToken); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(Name); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(ScriptFile); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(Command); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(PlayerDatabases); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(IsAccepted); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(Enabled); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(TileSetNames); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(PlayerID); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(Player); serializer.Write(Message); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(DestinationID); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(PasswordHash); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(MapData); serializer.Write(TileSetHashes); serializer.Write(ImageHashes); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(PublicKey); serializer.Write(VerificationToken); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(Reason); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write((byte)AuthorizationStatus); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(LogFilename); serializer.Write(LogFile); }
public override void Serialize(ProtobufSerializer serializer) { serializer.Write(CrashLogs); }