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