57 instantiations of ExtractionDocumentSourceReference
Microsoft.Extensions.DocumentExtraction.Abstractions.Tests (2)
Microsoft.Extensions.DocumentExtraction.Tests (2)
Microsoft.Extensions.Documents.Abstractions.Tests (53)
DocumentElementTests.cs (10)
42ExtractionDocumentSourceReference first = new(page);
43ExtractionDocumentSourceReference duplicate = new(page);
44ExtractionDocumentSourceReference last = new(new("page-2", 2));
63ExtractionDocumentSourceReference first = new(new("first", 1));
64ExtractionDocumentSourceReference second = new(new("second", 2));
86ExtractionDocumentSourceReference firstSource = new(new("first-page", 1), rawRepresentation: firstContent);
87ExtractionDocumentSourceReference secondSource = new(new("second-page", 2), rawRepresentation: secondContent);
113ExtractionDocumentSourceReference page = new(new("page-raw", 1));
196ExtractionDocumentSourceReference region = new(polygonOnly, DocumentAnnotationTestData.Polygon());
249element.Sources.Add(new ExtractionDocumentSourceReference(page, rawRepresentation: native));
DocumentReferencesTests.cs (15)
82ExtractionDocumentSourceReference reference = new(page, empty ? Array.Empty<ExtractionDocumentPoint>() : null, native);
83ExtractionDocumentSourceReference omitted = new(page);
100Assert.Throws<ArgumentException>("polygon", () => new ExtractionDocumentSourceReference(new("page", 1), new ExtractionDocumentPoint[count]));
109ExtractionDocumentSourceReference reference = new(page, points, native);
139ExtractionDocumentSourceReference reference = new(page, EnumerateOnce(), native);
183ExtractionDocumentSourceReference reference = new(page, EnumerateOnce());
190Assert.Throws<ArgumentException>("polygon", () => new ExtractionDocumentSourceReference(page, EnumerateOnce()));
210ExtractionDocumentSourceReference region = new(page, supplied);
233ExtractionDocumentSourceReference pdf = new(DocumentAnnotationTestData.PdfPage(), DocumentAnnotationTestData.Polygon());
241ExtractionDocumentSourceReference raster = new(rasterPage, expected);
258ExtractionDocumentSourceReference region = new(page, DocumentAnnotationTestData.Polygon());
272ExtractionDocumentSourceReference reference = new(page, DocumentAnnotationTestData.Polygon());
292ExtractionDocumentSourceReference valid = new(DocumentAnnotationTestData.PdfPage(), DocumentAnnotationTestData.Polygon());
363Assert.Throws<ArgumentNullException>("page", () => new ExtractionDocumentSourceReference(null!));
364Assert.Throws<ArgumentException>("polygon", () => new ExtractionDocumentSourceReference(page, new[] { new ExtractionDocumentPoint(1, 2), new ExtractionDocumentPoint(3, 4) }));
DocumentTableCellCollectionTests.cs (7)
137ExtractionDocumentSourceReference cellSource = new(page, DocumentAnnotationTestData.Polygon());
138ExtractionDocumentSourceReference firstSource = new(page, [new(1.25, 2.5), new(3.75, 2.5), new(1.25, 4.5)]);
139ExtractionDocumentSourceReference imageSource = new(page, [new(5.25, 6.5), new(7.75, 6.5), new(5.25, 8.5)]);
140ExtractionDocumentSourceReference lastSource = new(page, [new(9.25, 10.5), new(11.75, 10.5), new(9.25, 12.5)]);
390text.Sources.Add(new(new("merged-page", 1), rawRepresentation: stream));
446candidateText.Sources.Add(new(new("candidate-page", 1), rawRepresentation: stream));
509oldAnchor.Sources.Add(new ExtractionDocumentSourceReference(frame, DocumentAnnotationTestData.Polygon()));
45 references to ExtractionDocumentSourceReference
Microsoft.Extensions.DocumentExtraction.Abstractions.Tests (2)
Microsoft.Extensions.DocumentExtraction.Tests (2)
Microsoft.Extensions.Documents.Abstractions (3)
Microsoft.Extensions.Documents.Abstractions.Tests (38)
DocumentElementTests.cs (10)
42ExtractionDocumentSourceReference first = new(page);
43ExtractionDocumentSourceReference duplicate = new(page);
44ExtractionDocumentSourceReference last = new(new("page-2", 2));
63ExtractionDocumentSourceReference first = new(new("first", 1));
64ExtractionDocumentSourceReference second = new(new("second", 2));
86ExtractionDocumentSourceReference firstSource = new(new("first-page", 1), rawRepresentation: firstContent);
87ExtractionDocumentSourceReference secondSource = new(new("second-page", 2), rawRepresentation: secondContent);
113ExtractionDocumentSourceReference page = new(new("page-raw", 1));
196ExtractionDocumentSourceReference region = new(polygonOnly, DocumentAnnotationTestData.Polygon());
267Assert.DoesNotContain(typeof(ExtractionDocumentSourceReference).GetProperties(), property => property.Name == "RawRepresentation");
DocumentReferencesTests.cs (15)
37Assert.Equal(typeof(System.Collections.Generic.List<ExtractionDocumentSourceReference>), property.PropertyType);
41Assert.False(typeof(ExtractionDocumentSourceReference).GetProperty("Page")!.CanWrite);
42Assert.False(typeof(ExtractionDocumentSourceReference).GetProperty("Polygon")!.CanWrite);
82ExtractionDocumentSourceReference reference = new(page, empty ? Array.Empty<ExtractionDocumentPoint>() : null, native);
83ExtractionDocumentSourceReference omitted = new(page);
109ExtractionDocumentSourceReference reference = new(page, points, native);
139ExtractionDocumentSourceReference reference = new(page, EnumerateOnce(), native);
183ExtractionDocumentSourceReference reference = new(page, EnumerateOnce());
210ExtractionDocumentSourceReference region = new(page, supplied);
233ExtractionDocumentSourceReference pdf = new(DocumentAnnotationTestData.PdfPage(), DocumentAnnotationTestData.Polygon());
241ExtractionDocumentSourceReference raster = new(rasterPage, expected);
258ExtractionDocumentSourceReference region = new(page, DocumentAnnotationTestData.Polygon());
272ExtractionDocumentSourceReference reference = new(page, DocumentAnnotationTestData.Polygon());
292ExtractionDocumentSourceReference valid = new(DocumentAnnotationTestData.PdfPage(), DocumentAnnotationTestData.Polygon());
374private static ExtractionDocumentPoint[]? ProjectKnownOverlay(ExtractionDocumentSourceReference region)
DocumentTableCellCollectionTests.cs (4)
137ExtractionDocumentSourceReference cellSource = new(page, DocumentAnnotationTestData.Polygon());
138ExtractionDocumentSourceReference firstSource = new(page, [new(1.25, 2.5), new(3.75, 2.5), new(1.25, 4.5)]);
139ExtractionDocumentSourceReference imageSource = new(page, [new(5.25, 6.5), new(7.75, 6.5), new(5.25, 8.5)]);
140ExtractionDocumentSourceReference lastSource = new(page, [new(9.25, 10.5), new(11.75, 10.5), new(9.25, 12.5)]);