示例#1
0
        public static PaiTagSerializer Serialize(PaiTag tag)
        {
            var res = new PaiTagSerializer()
            {
                Unknown = tag.Unknown,
                TagType = tag.TagType
            };

            res.Entries = new List <PaiTagEntrySerializer>();
            foreach (var e in tag.Entries)
            {
                res.Entries.Add(PaiTagEntrySerializer.Serialize(e));
            }
            return(res);
        }
示例#2
0
        public static PaiEntrySerializer Serialize(PaiEntry e)
        {
            var res = new PaiEntrySerializer()
            {
                Name         = e.Name,
                Target       = (byte)e.Target,
                UnkwnownData = e.UnkwnownData
            };

            res.Tags = new List <PaiTagSerializer>();
            foreach (var t in e.Tags)
            {
                res.Tags.Add(PaiTagSerializer.Serialize(t));
            }
            return(res);
        }