Exemplo n.º 1
0
        public override void InternalFromBinary(IBinaryRawReader reader)
        {
            base.InternalFromBinary(reader);

            var version = VersionSerializationHelper.CheckVersionByte(reader, VERSION_NUMBER);

            if (version == 1)
            {
                if (reader.ReadBoolean())
                {
                    Boundary = new List <Fence>();

                    var fencesCount = reader.ReadInt();

                    for (var i = 0; i < fencesCount; i++)
                    {
                        var fence = new Fence();
                        fence.FromBinary(reader);
                        Boundary.Add(fence);
                    }
                }
            }
        }