33 instantiations of ExtractionDocumentPageDimensions
Microsoft.Extensions.DocumentExtraction.Abstractions.Tests (2)
DocumentExtractionDocumentBuilderTests.cs (2)
195
Assert.Equal(new
ExtractionDocumentPageDimensions
(200, 100), frame.Dimensions);
408
new("pdf-frame", 7, new
ExtractionDocumentPageDimensions
(200, 100), ExtractionDocumentCoordinateUnit.Point, ExtractionDocumentCoordinateOrigin.BottomLeft);
Microsoft.Extensions.Documents.Abstractions.Tests (31)
DocumentAnnotationTestData.cs (1)
23
new("urn:frame:pdf-A", 7, new
ExtractionDocumentPageDimensions
(200, 100),
DocumentElementTests.cs (2)
194
ExtractionDocumentSourcePage dimensionsOnly = new("dimensions-only", 7, new
ExtractionDocumentPageDimensions
(200, 100));
210
Assert.Equal(new
ExtractionDocumentPageDimensions
(200, 100), dimensionsOnly.Dimensions);
DocumentReferencesTests.cs (17)
224
Assert.Equal(new
ExtractionDocumentPageDimensions
(200, 100), page.Dimensions);
239
ExtractionDocumentSourcePage rasterPage = new("urn:frame:raster-A", 7, new
ExtractionDocumentPageDimensions
(400, 200),
246
Assert.Equal(new
ExtractionDocumentPageDimensions
(400, 200), raster.Page.Dimensions);
255
ExtractionDocumentSourcePage page = new("partial", 7, new
ExtractionDocumentPageDimensions
(200, 100),
262
Assert.Equal(new
ExtractionDocumentPageDimensions
(200, 100), page.Dimensions);
288
Assert.Throws<ArgumentOutOfRangeException>("width", () => new
ExtractionDocumentPageDimensions
(value, 100));
289
Assert.Throws<ArgumentOutOfRangeException>("height", () => new
ExtractionDocumentPageDimensions
(200, value));
290
Assert.Throws<ArgumentOutOfRangeException>("width", () => new
ExtractionDocumentPageDimensions
(value, 0));
291
Assert.Throws<ArgumentOutOfRangeException>("height", () => new
ExtractionDocumentPageDimensions
(0, value));
300
ExtractionDocumentPageDimensions empty =
new
(0, 0);
311
ExtractionDocumentPageDimensions positive =
new
(double.Epsilon, double.Epsilon);
334
Assert.Throws<ArgumentOutOfRangeException>(parameter, () => new
ExtractionDocumentPageDimensions
(width, height));
342
ExtractionDocumentPageDimensions dimensions = explicitEmpty ?
new
(0, 0) : default;
357
Assert.Throws<ArgumentOutOfRangeException>("width", () => new
ExtractionDocumentPageDimensions
(0, 100));
358
Assert.Throws<ArgumentOutOfRangeException>("height", () => new
ExtractionDocumentPageDimensions
(200, -1));
376
if (region.Page.Dimensions == new
ExtractionDocumentPageDimensions
(200, 100) &&
389
return region.Page.Dimensions == new
ExtractionDocumentPageDimensions
(400, 200) &&
DocumentReviewFollowUpTests.cs (3)
223
ExtractionDocumentPageDimensions size =
new
(200, 100);
224
ExtractionDocumentPageDimensions equalSize =
new
(200, 100);
225
ExtractionDocumentPageDimensions differentSize =
new
(100, 200);
DocumentTableCellCollectionTests.cs (1)
223
Assert.Equal(new
ExtractionDocumentPageDimensions
(200, 100), page.Dimensions);
DocumentTableCellTests.cs (3)
157
ExtractionDocumentSourcePage raster = new("raster-frame", 7, new
ExtractionDocumentPageDimensions
(400, 200),
201
Assert.Equal(new
ExtractionDocumentPageDimensions
(200, 100), sources[0].Page.Dimensions);
202
Assert.Equal(new
ExtractionDocumentPageDimensions
(400, 200), sources[1].Page.Dimensions);
DocumentTests.cs (2)
190
ExtractionDocumentSourcePage page = new("urn:frame:blank-page2", 2, new
ExtractionDocumentPageDimensions
(200, 100),
200
Assert.Equal(new
ExtractionDocumentPageDimensions
(200, 100), page.Dimensions);
PreviewContractTests.cs (2)
84
ExtractionDocumentSourcePage seven = new("physical:7", 7,
new
(200, 100),
101
Assert.Equal(new
ExtractionDocumentPageDimensions
(200, 100), seven.Dimensions);
19 references to ExtractionDocumentPageDimensions
Microsoft.Extensions.Documents.Abstractions (10)
ExtractionDocumentSources.cs (10)
81
public readonly struct ExtractionDocumentPageDimensions : IEquatable<
ExtractionDocumentPageDimensions
>
83
/// <summary>Initializes a new instance of the <see cref="
ExtractionDocumentPageDimensions
"/> struct.</summary>
105
public bool Equals(
ExtractionDocumentPageDimensions
other) => Width.Equals(other.Width) && Height.Equals(other.Height);
108
public override bool Equals(object? obj) => obj is
ExtractionDocumentPageDimensions
other && Equals(other);
114
public static bool operator ==(
ExtractionDocumentPageDimensions
left,
ExtractionDocumentPageDimensions
right)
120
public static bool operator !=(
ExtractionDocumentPageDimensions
left,
ExtractionDocumentPageDimensions
right)
133
ExtractionDocumentPageDimensions
? dimensions = null,
167
public
ExtractionDocumentPageDimensions
? Dimensions { get; }
Microsoft.Extensions.Documents.Abstractions.Tests (9)
DocumentReferencesTests.cs (5)
300
ExtractionDocumentPageDimensions
empty = new(0, 0);
301
ExtractionDocumentPageDimensions
defaultDimensions = default;
311
ExtractionDocumentPageDimensions
positive = new(double.Epsilon, double.Epsilon);
342
ExtractionDocumentPageDimensions
dimensions = explicitEmpty ? new(0, 0) : default;
360
Assert.Throws<ArgumentOutOfRangeException>("dimensions", () => new ExtractionDocumentSourcePage("frame", 1, default(
ExtractionDocumentPageDimensions
)));
DocumentReviewFollowUpTests.cs (4)
223
ExtractionDocumentPageDimensions
size = new(200, 100);
224
ExtractionDocumentPageDimensions
equalSize = new(200, 100);
225
ExtractionDocumentPageDimensions
differentSize = new(100, 200);
235
() => new ExtractionDocumentSourcePage("frame", null, default(
ExtractionDocumentPageDimensions
)));