30 references to Throw
Microsoft.Extensions.Documents.Abstractions (30)
ExtractionDocument.cs (1)
24Identifier = Throw.IfNullOrEmpty(identifier);
ExtractionDocumentElement.cs (5)
32_ = Throw.IfNull(value); 35Throw.ArgumentException(nameof(value), "A text element requires TextContent."); 69: base(Throw.IfNull(content)) 71Role = role is null ? null : Throw.IfNullOrWhitespace(role); 91_ = Throw.IfLessThanOrEqual(value.Value, 0, nameof(value));
ExtractionDocumentSources.cs (10)
90_ = Throw.IfLessThanOrEqual(width, 0); 91_ = Throw.IfLessThanOrEqual(height, 0); 137Identifier = Throw.IfNullOrEmpty(identifier); 138PageNumber = pageNumber is { } number ? Throw.IfLessThanOrEqual(number, 0, nameof(pageNumber)) : null; 141Throw.ArgumentOutOfRangeException(nameof(dimensions)); 146Throw.ArgumentOutOfRangeException(nameof(coordinateUnit)); 151Throw.ArgumentOutOfRangeException(nameof(coordinateOrigin)); 194Page = Throw.IfNull(page); 198Throw.ArgumentException(nameof(polygon), "A source polygon must contain at least three vertices."); 222Throw.ArgumentOutOfRangeException(name, "A coordinate must be finite.");
ExtractionDocumentTable.cs (14)
26_ = Throw.IfLessThan(rowCount, 0); 27_ = Throw.IfLessThan(columnCount, 0); 55Content = Throw.IfNull(content); 56RowSpan = Throw.IfLessThan(rowSpan, 1); 57ColumnSpan = Throw.IfLessThan(columnSpan, 1); 58Role = role is null ? null : Throw.IfNullOrWhitespace(role); 64RowSpan = Throw.IfLessThan(rowSpan, 1); 65ColumnSpan = Throw.IfLessThan(columnSpan, 1); 66Role = role is null ? null : Throw.IfNullOrWhitespace(role); 244Throw.ArgumentException(nameof(cell), "A cell span must fit within the table."); 261_ = Throw.IfLessThan(row, 0, nameof(row)); 262_ = Throw.IfGreaterThanOrEqual(row, RowCount, nameof(row)); 263_ = Throw.IfLessThan(column, 0, nameof(column)); 264_ = Throw.IfGreaterThanOrEqual(column, ColumnCount, nameof(column));