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