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