コード例 #1
0
 internal override void ValidateTransition(SpatialValidatorImplementation.NestedValidator.PipelineCall transition, SpatialValidatorImplementation.NestedValidator validator)
 {
     SpatialValidatorImplementation.NestedValidator.PipelineCall call = transition;
     if (call == SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginFigure)
     {
         validator.Jump(SpatialValidatorImplementation.NestedValidator.PolygonBuilding);
     }
     else if (call == SpatialValidatorImplementation.NestedValidator.PipelineCall.End)
     {
         validator.ringCount = 0;
         validator.Return();
     }
     else
     {
         SpatialValidatorImplementation.NestedValidator.ValidatorState.ThrowExpected(SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginFigure, SpatialValidatorImplementation.NestedValidator.PipelineCall.End, transition);
     }
 }
コード例 #2
0
 internal override void ValidateTransition(SpatialValidatorImplementation.NestedValidator.PipelineCall transition, SpatialValidatorImplementation.NestedValidator validator)
 {
     if (transition == SpatialValidatorImplementation.NestedValidator.PipelineCall.End)
     {
         validator.Return();
     }
     else
     {
         SpatialValidatorImplementation.NestedValidator.ValidatorState.ThrowExpected(SpatialValidatorImplementation.NestedValidator.PipelineCall.End, transition);
     }
 }
コード例 #3
0
 internal override void ValidateTransition(SpatialValidatorImplementation.NestedValidator.PipelineCall transition, SpatialValidatorImplementation.NestedValidator validator)
 {
     SpatialValidatorImplementation.NestedValidator.PipelineCall call = transition;
     if (call != SpatialValidatorImplementation.NestedValidator.PipelineCall.SetCoordinateSystem)
     {
         if (call == SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginPolygon)
         {
             validator.Call(SpatialValidatorImplementation.NestedValidator.PolygonStart);
         }
         else if (call == SpatialValidatorImplementation.NestedValidator.PipelineCall.End)
         {
             validator.Return();
         }
         else
         {
             SpatialValidatorImplementation.NestedValidator.ValidatorState.ThrowExpected(SpatialValidatorImplementation.NestedValidator.PipelineCall.SetCoordinateSystem, SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginPolygon, SpatialValidatorImplementation.NestedValidator.PipelineCall.End, transition);
         }
     }
 }
コード例 #4
0
                internal override void ValidateTransition(SpatialValidatorImplementation.NestedValidator.PipelineCall transition, SpatialValidatorImplementation.NestedValidator validator)
                {
                    switch (transition)
                    {
                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.SetCoordinateSystem:
                            return;

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginPoint:
                            validator.Call(SpatialValidatorImplementation.NestedValidator.PointStart);
                            return;

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.End:
                            validator.Return();
                            return;
                    }
                    SpatialValidatorImplementation.NestedValidator.ValidatorState.ThrowExpected(SpatialValidatorImplementation.NestedValidator.PipelineCall.SetCoordinateSystem, SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginPoint, SpatialValidatorImplementation.NestedValidator.PipelineCall.End, transition);
                }
コード例 #5
0
 internal override void ValidateTransition(SpatialValidatorImplementation.NestedValidator.PipelineCall transition, SpatialValidatorImplementation.NestedValidator validator)
 {
     if (transition != SpatialValidatorImplementation.NestedValidator.PipelineCall.End)
     {
         throw new FormatException(Strings.Validator_FullGlobeCannotHaveElements);
     }
     validator.Return();
 }
コード例 #6
0
                internal override void ValidateTransition(SpatialValidatorImplementation.NestedValidator.PipelineCall transition, SpatialValidatorImplementation.NestedValidator validator)
                {
                    switch (transition)
                    {
                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.SetCoordinateSystem:
                            return;

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginPoint:
                            validator.Call(SpatialValidatorImplementation.NestedValidator.PointStart);
                            return;

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginLineString:
                            validator.Call(SpatialValidatorImplementation.NestedValidator.LineStringStart);
                            return;

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginPolygon:
                            validator.Call(SpatialValidatorImplementation.NestedValidator.PolygonStart);
                            return;

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginMultiPoint:
                            validator.Call(SpatialValidatorImplementation.NestedValidator.MultiPoint);
                            return;

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginMultiLineString:
                            validator.Call(SpatialValidatorImplementation.NestedValidator.MultiLineString);
                            return;

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginMultiPolygon:
                            validator.Call(SpatialValidatorImplementation.NestedValidator.MultiPolygon);
                            return;

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginCollection:
                            validator.Call(SpatialValidatorImplementation.NestedValidator.Collection);
                            return;

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.BeginFullGlobe:
                            throw new FormatException(Strings.Validator_FullGlobeInCollection);

                        case SpatialValidatorImplementation.NestedValidator.PipelineCall.End:
                            validator.Return();
                            return;
                    }
                    SpatialValidatorImplementation.NestedValidator.ValidatorState.ThrowExpected(SpatialValidatorImplementation.NestedValidator.PipelineCall.SetCoordinateSystem, SpatialValidatorImplementation.NestedValidator.PipelineCall.Begin, SpatialValidatorImplementation.NestedValidator.PipelineCall.End, transition);
                }