1 write to Polygon
Microsoft.Extensions.Documents.Abstractions (1)
ExtractionDocumentSources.cs (1)
195Polygon = new ReadOnlyCollection<ExtractionDocumentPoint>((polygon ?? Array.Empty<ExtractionDocumentPoint>()).ToArray());
38 references to Polygon
Microsoft.Extensions.DocumentExtraction.Abstractions.Tests (1)
DocumentExtractionDocumentBuilderTests.cs (1)
194Assert.Equal(Polygon(), reference.Polygon);
Microsoft.Extensions.Documents.Abstractions (1)
ExtractionDocumentSources.cs (1)
196if (Polygon.Count is 1 or 2)
Microsoft.Extensions.Documents.Abstractions.Tests (36)
DocumentElementTests.cs (1)
209Assert.Equal(DocumentAnnotationTestData.Polygon(), region.Polygon);
DocumentExtensionElementTests.cs (1)
92Assert.Throws<NotSupportedException>(() => ((System.Collections.Generic.IList<ExtractionDocumentPoint>)first.Polygon).Clear());
DocumentReferencesTests.cs (21)
85Assert.Empty(reference.Polygon); 86Assert.Empty(omitted.Polygon); 111Assert.Equal(new[] { new ExtractionDocumentPoint(1, 2), new ExtractionDocumentPoint(3, 4), new ExtractionDocumentPoint(5, 6) }, reference.Polygon); 146Assert.Equal(expected, reference.Polygon); 147Assert.Equal(expected, reference.Polygon.ToArray()); 152IList<ExtractionDocumentPoint> polygon = Assert.IsAssignableFrom<IList<ExtractionDocumentPoint>>(reference.Polygon); 157Assert.Equal(expected, reference.Polygon); 184Assert.Empty(reference.Polygon); 219Assert.Equal(DocumentAnnotationTestData.Polygon(), region.Polygon); 227Assert.Throws<NotSupportedException>(() => ((System.Collections.Generic.IList<ExtractionDocumentPoint>)region.Polygon)[0] = default); 245Assert.Equal(DocumentAnnotationTestData.Polygon(), pdf.Polygon); 247Assert.NotEqual(pdf.Polygon[0], raster.Polygon[0]); 261Assert.Equal(DocumentAnnotationTestData.Polygon(), region.Polygon); 276Assert.Equal(DocumentAnnotationTestData.Polygon(), reference.Polygon); 293Assert.Equal(5, valid.Polygon.Count); 294Assert.Equal(60.125, valid.Polygon[2].Y); 380ExtractionDocumentPoint[] result = new ExtractionDocumentPoint[region.Polygon.Count]; 383result[i] = new ExtractionDocumentPoint(2 * region.Polygon[i].X, 2 * (100 - region.Polygon[i].Y)); 392? System.Linq.Enumerable.ToArray(region.Polygon)
DocumentTableCellCollectionTests.cs (5)
217Assert.Equal(DocumentAnnotationTestData.Polygon(), cellSource.Polygon); 218Assert.Equal(new ExtractionDocumentPoint[] { new(1.25, 2.5), new(3.75, 2.5), new(1.25, 4.5) }, firstSource.Polygon); 219Assert.Equal(new ExtractionDocumentPoint[] { new(5.25, 6.5), new(7.75, 6.5), new(5.25, 8.5) }, imageSource.Polygon); 220Assert.Equal(new ExtractionDocumentPoint[] { new(9.25, 10.5), new(11.75, 10.5), new(9.25, 12.5) }, lastSource.Polygon); 584Assert.Equal(DocumentAnnotationTestData.Polygon(), oldAnchor.Sources[0].Polygon);
DocumentTableCellTests.cs (3)
134Assert.Equal(DocumentAnnotationTestData.Polygon(), empty.Sources[0].Polygon); 197Assert.Equal(DocumentAnnotationTestData.Polygon(), sources[0].Polygon); 198Assert.Equal(rasterPolygon, sources[1].Polygon);
DocumentTableElementTests.cs (1)
321Assert.Equal(DocumentAnnotationTestData.Polygon(), empty.Sources[0].Polygon);
DocumentTests.cs (1)
183Assert.Equal(DocumentAnnotationTestData.Polygon(), region.Polygon);
DocumentTextElementTests.cs (1)
48Assert.Equal(DocumentAnnotationTestData.Polygon(), citation.Polygon);
PreviewContractTests.cs (2)
104Assert.Empty(text.Sources[0].Polygon); 105Assert.Equal(polygon, text.Sources[1].Polygon);