コード例 #1
0
        /// <summary>
        /// Serialize in the state of the cell spatial filter using the Ignite IBinarizable serialisation
        /// </summary>
        public override void InternalFromBinary(IBinaryRawReader reader)
        {
            var version = VersionSerializationHelper.CheckVersionByte(reader, VERSION_NUMBER);

            if (version == 1)
            {
                if (reader.ReadBoolean())
                {
                    (Fence ??= new Fence()).FromBinary(reader);
                }

                if (reader.ReadBoolean())
                {
                    (AlignmentFence ??= new Fence()).FromBinary(reader);
                }

                PositionX      = reader.ReadDouble();
                PositionY      = reader.ReadDouble();
                PositionRadius = reader.ReadDouble();
                IsSquare       = reader.ReadBoolean();

                OverrideSpatialCellRestriction = new BoundingIntegerExtent2D();
                OverrideSpatialCellRestriction = OverrideSpatialCellRestriction.FromBinary(reader);

                StartStation = reader.ReadBoolean() ? reader.ReadDouble() : (double?)null;
                EndStation   = reader.ReadBoolean() ? reader.ReadDouble() : (double?)null;
                LeftOffset   = reader.ReadBoolean() ? reader.ReadDouble() : (double?)null;
                RightOffset  = reader.ReadBoolean() ? reader.ReadDouble() : (double?)null;

                CoordsAreGrid = reader.ReadBoolean();
                IsSpatial     = reader.ReadBoolean();
                IsPositional  = reader.ReadBoolean();

                IsDesignMask = reader.ReadBoolean();
                SurfaceDesignMaskDesignUid   = reader.ReadGuid() ?? Guid.Empty;
                IsAlignmentMask              = reader.ReadBoolean();
                AlignmentDesignMaskDesignUID = reader.ReadGuid() ?? Guid.Empty;
            }
        }