Beispiel #1
0
 public override void Serialize(ProtobufSerializer serializer)
 {
     serializer.Write(Time);
     serializer.Write(Season);
     serializer.Write(Weather);
     serializer.Write(Event);
 }
Beispiel #2
0
        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);
        }
Beispiel #4
0
 public override void Serialize(ProtobufSerializer serializer)
 {
     serializer.Write(BattleState);
 }
 public override void Serialize(ProtobufSerializer serializer)
 {
     serializer.Write(SharedSecret);
     serializer.Write(VerificationToken);
 }
Beispiel #6
0
 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);
 }
Beispiel #9
0
 public override void Serialize(ProtobufSerializer serializer)
 {
     serializer.Write(PlayerDatabases);
 }
Beispiel #10
0
 public override void Serialize(ProtobufSerializer serializer)
 {
     serializer.Write(IsAccepted);
 }
Beispiel #11
0
 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);
 }
Beispiel #14
0
 public override void Serialize(ProtobufSerializer serializer)
 {
     serializer.Write(Player);
     serializer.Write(Message);
 }
Beispiel #15
0
 public override void Serialize(ProtobufSerializer serializer)
 {
     serializer.Write(DestinationID);
 }
 public override void Serialize(ProtobufSerializer serializer)
 {
     serializer.Write(PasswordHash);
 }
Beispiel #17
0
 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);
 }
Beispiel #21
0
 public override void Serialize(ProtobufSerializer serializer)
 {
     serializer.Write(LogFilename);
     serializer.Write(LogFile);
 }
 public override void Serialize(ProtobufSerializer serializer)
 {
     serializer.Write(CrashLogs);
 }