示例#1
0
        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);
        }
示例#2
0
        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();
        }