コード例 #1
0
        private ShapeRecord[] GenerateManyRecords(ShapeType typeOfShape, ShapeRecordCount count)
        {
            var records = new ShapeRecord[count.ToInt32()];
            var number  = RecordNumber.Initial;

            for (var index = 0; index < records.Length; index++)
            {
                ShapeContent content = null;
                switch (typeOfShape)
                {
                case ShapeType.Point:
                    content = new PointShapeContent(_fixture.Create <PointM>());
                    break;

                case ShapeType.PolyLineM:
                    content = new PolyLineMShapeContent(_fixture.Create <MultiLineString>());
                    break;

                //case ShapeType.NullShape:
                default:
                    content = NullShapeContent.Instance;
                    break;
                }

                records[index] = content.RecordAs(number);
                number         = number.Next();
            }

            return(records);
        }
コード例 #2
0
        private ShapeRecord GenerateOneRecord(ShapeType typeOfShape)
        {
            ShapeContent content = null;

            switch (typeOfShape)
            {
            case ShapeType.Point:
                content = new PointShapeContent(_fixture.Create <PointM>());
                break;

            case ShapeType.PolyLineM:
                content = new PolyLineMShapeContent(_fixture.Create <MultiLineString>());
                break;

            //case ShapeType.NullShape:
            default:
                content = NullShapeContent.Instance;
                break;
            }

            return(content.RecordAs(RecordNumber.Initial));
        }