/// <summary> /// Serializes content to the writer /// </summary> public void ToBinary(IBinaryRawWriter writer) { writer.WriteDouble(Station); writer.WriteDouble(Offset); writer.WriteDouble(Northing); writer.WriteDouble(Easting); }
/// <summary> /// An extension method providing a ToBinary() semantic to Fence /// </summary> public static void ToBinary(this Fence item, IBinaryRawWriter writer) { const byte VERSION_NUMBER = 1; VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); bool isNull = item.IsNull(); writer.WriteBoolean(isNull); if (isNull) { return; } writer.WriteBoolean(item.IsRectangle); writer.WriteInt(item.NumVertices); foreach (var point in item.Points) { writer.WriteDouble(point.X); writer.WriteDouble(point.Y); writer.WriteDouble(point.Z); } }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteDouble(SpotX); writer.WriteDouble(SpotY); }
public void ToBinary(IBinaryRawWriter writer) { writer.WriteBoolean(UseIntegerAlgorithm); writer.WriteDouble(PixelXWorldSize); writer.WriteDouble(PixelYWorldSize); writer.WriteDouble(UserOriginX); writer.WriteDouble(UserOriginY); writer.WriteDouble(Rotation); }
/// <summary> /// An extension method providing a ToBinary() semantic to XYZ /// </summary> public static void ToBinary(this XYZ item, IBinaryRawWriter writer) { const byte VERSION_NUMBER = 1; VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteDouble(item.X); writer.WriteDouble(item.Y); writer.WriteDouble(item.Z); }
/// <summary> /// Serialises content to the writer /// </summary> public void ToBinary(IBinaryRawWriter writer) { writer.WriteDouble(Northing); writer.WriteDouble(Easting); writer.WriteDouble(Elevation); writer.WriteDouble(CutFill); writer.WriteShort(Cmv); writer.WriteShort(Mdp); writer.WriteShort(PassCount); writer.WriteShort(Temperature); }
public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteDouble(StartStation); writer.WriteDouble(EndStation); writer.WriteDouble(LeftOffset); writer.WriteDouble(RightOffset); }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteGuid(AlignmentDesignUid); writer.WriteDouble(CrossSectionInterval); writer.WriteDouble(StartStation); writer.WriteDouble(EndStation); writer.WriteDoubleArray(Offsets); }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteDouble(Station); writer.WriteDouble(InterceptLength); writer.WriteInt(OTGCellX); writer.WriteInt(OTGCellY); writer.WriteFloat(DesignElev); }
public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteGuid(DesignID); writer.WriteDouble(Offset); }
public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteGuid(SiteModelID); writer.WriteInt((int)OTGCellBottomLeftX); writer.WriteInt((int)OTGCellBottomLeftY); writer.WriteDouble(CellSize); writer.WriteByte((byte)SurveyedSurfacePatchType); writer.WriteBoolean(ProcessingMap != null); if (ProcessingMap != null) { writer.WriteByteArray(ProcessingMap.ToBytes()); } writer.WriteBoolean(IncludedSurveyedSurfaces != null); if (IncludedSurveyedSurfaces != null) { var count = IncludedSurveyedSurfaces.Length; writer.WriteInt(count); for (int i = 0; i < count; i++) { writer.WriteGuid(IncludedSurveyedSurfaces[i]); } } }
/// <summary> /// Serialises content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteDouble(CellSize); writer.WriteDouble(MinElevation); writer.WriteDouble(MaxElevation); writer.WriteInt(CellsUsed); writer.WriteInt(CellsScanned); writer.WriteBoolean(BoundingExtents != null); BoundingExtents?.ToBinary(writer); }
public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteDouble(Elevation); writer.WriteInt((int)CalcResult); }
/// <summary> /// Writes this instance to a writer. /// </summary> internal void Write(IBinaryRawWriter writer) { writer.WriteString(Name); writer.WriteLong(Size); writer.WriteString(SwapFilePath); writer.WriteInt((int)PageEvictionMode); writer.WriteDouble(EvictionThreshold); writer.WriteInt(EmptyPagesPoolSize); }
/// <summary> /// Serialises content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteInt((int)DisplayMode); writer.WriteInt((int)ReturnCode); writer.WriteBoolean(Value.HasValue); if (Value.HasValue) { writer.WriteDouble(Value.Value); } writer.WriteBoolean(TimeStampUTC.HasValue); if (TimeStampUTC.HasValue) { writer.WriteLong(TimeStampUTC.Value.ToBinary()); } writer.WriteDouble(Northing); writer.WriteDouble(Easting); }
/// <summary> /// Writes this instance to a writer. /// </summary> internal void Write(IBinaryRawWriter writer) { writer.WriteString(Name); writer.WriteLong(InitialSize); writer.WriteLong(MaxSize); writer.WriteString(SwapFilePath); writer.WriteInt((int)PageEvictionMode); writer.WriteDouble(EvictionThreshold); writer.WriteInt(EmptyPagesPoolSize); writer.WriteBoolean(MetricsEnabled); }
public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteGuid(ProjectID); writer.WriteGuid(AlignmentDesignID); writer.WriteBoolean(ConvertArcsToPolyLines); writer.WriteDouble(ArcChordTolerance); }
public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteInt(Profile?.Count ?? 0); if (Profile != null) { foreach (var pt in Profile) { writer.WriteDouble(pt.X); writer.WriteDouble(pt.Y); writer.WriteDouble(pt.Z); writer.WriteDouble(pt.Station); writer.WriteInt(pt.TriIndex); } } }
public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteString(DateSeparator); writer.WriteString(TimeSeparator); writer.WriteString(ThousandsSeparator); writer.WriteString(DecimalSeparator); writer.WriteInt((int)Units); writer.WriteInt((int)TemperatureUnits); writer.WriteDouble(ProjectTimeZoneOffset); }
/// <summary> /// Serializes content to the writer /// </summary> public void ToBinary(IBinaryRawWriter writer) { writer.WriteDouble(Station); writer.WriteInt(Offsets.Count); foreach (var offset in Offsets) { offset.ToBinary(writer); } Minimum.ToBinary(writer); Maximum.ToBinary(writer); Average.ToBinary(writer); }
/// <summary> /// Serialises content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteDouble(MinElevation); writer.WriteDouble(MaxElevation); writer.WriteDouble(ElevationPerBand); writer.WriteBoolean(ElevationPalette != null); if (ElevationPalette != null) { writer.WriteInt(ElevationPalette.Length); foreach (var color in ElevationPalette) { writer.WriteInt(color.ToArgb()); } } }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteBoolean(Cut.HasValue); if (Cut.HasValue) { writer.WriteDouble(Cut.Value); } writer.WriteBoolean(Fill.HasValue); if (Fill.HasValue) { writer.WriteDouble(Fill.Value); } writer.WriteBoolean(TotalCoverageArea.HasValue); if (TotalCoverageArea.HasValue) { writer.WriteDouble(TotalCoverageArea.Value); } writer.WriteBoolean(CutArea.HasValue); if (CutArea.HasValue) { writer.WriteDouble(CutArea.Value); } writer.WriteBoolean(FillArea.HasValue); if (FillArea.HasValue) { writer.WriteDouble(FillArea.Value); } BoundingExtentGrid.ToBinary(writer); BoundingExtentLLH.ToBinary(writer); }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteGuid(ProjectID); writer.WriteInt((int)VolumeType); WriteFilter(writer, BaseFilter); WriteFilter(writer, TopFilter); writer.WriteBoolean(BaseDesign != null); BaseDesign?.ToBinary(writer); writer.WriteBoolean(TopDesign != null); TopDesign?.ToBinary(writer); WriteFilter(writer, AdditionalSpatialFilter); writer.WriteDouble(CutTolerance); writer.WriteDouble(FillTolerance); }
public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteInt((int)ReturnCode); writer.WriteDouble(Northing); writer.WriteDouble(Easting); writer.WriteInt(CellPasses.Count); using (var ms = RecyclableMemoryStreamManagerHelper.Manager.GetStream()) { using (var bw = new BinaryWriter(ms, Encoding.UTF8, true)) { CellPasses.ForEach(result => { result.Write(bw); }); } var bytes = ms.ToArray(); writer.WriteByteArray(bytes); } }
/// <summary> /// Writes this instance to a writer. /// </summary> internal void Write(IBinaryRawWriter writer) { writer.WriteString(Name); writer.WriteBoolean(PersistenceEnabled); writer.WriteLong(InitialSize); writer.WriteLong(MaxSize); writer.WriteString(SwapPath); writer.WriteInt((int)PageEvictionMode); writer.WriteDouble(EvictionThreshold); writer.WriteInt(EmptyPagesPoolSize); writer.WriteBoolean(MetricsEnabled); writer.WriteInt(MetricsSubIntervalCount); writer.WriteTimeSpanAsLong(MetricsRateTimeInterval); }
/// <summary> /// Serialize out the state of the cell spatial filter using the Ignite IBinarizable serialisation /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteBoolean(Fence != null); Fence?.ToBinary(writer); writer.WriteBoolean(AlignmentFence != null); AlignmentFence?.ToBinary(writer); writer.WriteDouble(PositionX); writer.WriteDouble(PositionY); writer.WriteDouble(PositionRadius); writer.WriteBoolean(IsSquare); OverrideSpatialCellRestriction.ToBinary(writer); writer.WriteBoolean(StartStation.HasValue); if (StartStation.HasValue) { writer.WriteDouble(StartStation.Value); } writer.WriteBoolean(EndStation.HasValue); if (EndStation.HasValue) { writer.WriteDouble(EndStation.Value); } writer.WriteBoolean(LeftOffset.HasValue); if (LeftOffset.HasValue) { writer.WriteDouble(LeftOffset.Value); } writer.WriteBoolean(RightOffset.HasValue); if (RightOffset.HasValue) { writer.WriteDouble(RightOffset.Value); } writer.WriteBoolean(CoordsAreGrid); writer.WriteBoolean(IsSpatial); writer.WriteBoolean(IsPositional); writer.WriteBoolean(IsDesignMask); writer.WriteGuid(SurfaceDesignMaskDesignUid); writer.WriteBoolean(IsAlignmentMask); writer.WriteGuid(AlignmentDesignMaskDesignUID); }
/// <summary> /// Serialises content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteLongArray(Counts); writer.WriteDouble(CellSize); writer.WriteInt(SummaryCellsScanned); writer.WriteInt(CellsScannedAtTarget); writer.WriteInt(CellsScannedOverTarget); writer.WriteInt(CellsScannedUnderTarget); writer.WriteBoolean(IsTargetValueConstant); writer.WriteBoolean(MissingTargetValue); }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteDouble(CellSize); var count = ProfilePathNEE?.Length ?? 0; writer.WriteInt(count); for (int i = 0; i < count; i++) { ProfilePathNEE[i].ToBinary(writer); } }
/// <summary> /// Serializes content to the writer /// </summary> public override void InternalToBinary(IBinaryRawWriter writer) { base.InternalToBinary(writer); VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteDouble(CellSize); writer.WriteBoolean(StartPoint != null); StartPoint?.ToBinary(writer); writer.WriteBoolean(EndPoint != null); EndPoint?.ToBinary(writer); writer.WriteBoolean(PositionsAreGrid); }
/// <summary> /// An extension method providing a ToBinary() semantic to BoundingWorldExtent3D /// </summary> public static void ToBinary(this BoundingWorldExtent3D item, IBinaryRawWriter writer) { const byte VERSION_NUMBER = 1; VersionSerializationHelper.EmitVersionByte(writer, VERSION_NUMBER); writer.WriteDouble(item.MinX); writer.WriteDouble(item.MinY); writer.WriteDouble(item.MinZ); writer.WriteDouble(item.MaxX); writer.WriteDouble(item.MaxY); writer.WriteDouble(item.MaxZ); }