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