public void ChainCustomPipeline() { var validator = SpatialValidator.Create(); var customPipeline = new CustomPipeline(); var pipeline = validator.ChainTo(customPipeline).StartingLink; pipeline.GeographyPipeline.SetCoordinateSystem(CoordinateSystem.DefaultGeography); Assert.IsTrue(customPipeline.GeographySetCoordinateSystemWasCalled); }
public void UseValidatorsInParallel() { var validator = SpatialValidator.Create(); var geographyPipeline = (GeographyPipeline)validator; geographyPipeline.SetCoordinateSystem(CoordinateSystem.DefaultGeography); var geometryPipeline = (GeometryPipeline)validator; geometryPipeline.SetCoordinateSystem(CoordinateSystem.DefaultGeography); geometryPipeline.BeginGeometry(SpatialType.Point); geographyPipeline.BeginGeography(SpatialType.Point); geometryPipeline.BeginFigure(new GeometryPosition(12, 12, null, null)); geographyPipeline.BeginFigure(new GeographyPosition(45, 45, null, null)); geometryPipeline.EndFigure(); geometryPipeline.EndGeometry(); geographyPipeline.EndFigure(); geographyPipeline.EndGeography(); }