Пример #1
0
            public PawnFilter Deserialize()
            {
                PawnFilter pawnFilter = new PawnFilter {
                    name = this.name
                };

                foreach (PawnFilterPart.PawnFilterPartSerializable pawnFilterPart in this.parts)
                {
                    pawnFilter.parts.Add(pawnFilterPart.Deserialize());
                }
                return(pawnFilter);
            }
Пример #2
0
            }                                                // Parameterless constructor necessary for serialization.

            public PawnFilterSerializable(PawnFilter pawnFilter)
            {
                this.name = pawnFilter.name;

                List <PawnFilterPart.PawnFilterPartSerializable> parts = new List <PawnFilterPart.PawnFilterPartSerializable>();

                foreach (PawnFilterPart pawnFilterPart in pawnFilter.parts)
                {
                    parts.Add(pawnFilterPart.Serialize());
                }
                this.parts = parts.ToArray();
            }