30 references to Throw
Microsoft.Extensions.Documents.Abstractions (30)
ExtractionDocument.cs (1)
24
Identifier =
Throw
.IfNullOrEmpty(identifier);
ExtractionDocumentElement.cs (5)
32
_ =
Throw
.IfNull(value);
35
Throw
.ArgumentException(nameof(value), "A text element requires TextContent.");
69
: base(
Throw
.IfNull(content))
71
Role = 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);
137
Identifier =
Throw
.IfNullOrEmpty(identifier);
138
PageNumber = pageNumber is { } number ?
Throw
.IfLessThanOrEqual(number, 0, nameof(pageNumber)) : null;
141
Throw
.ArgumentOutOfRangeException(nameof(dimensions));
146
Throw
.ArgumentOutOfRangeException(nameof(coordinateUnit));
151
Throw
.ArgumentOutOfRangeException(nameof(coordinateOrigin));
194
Page =
Throw
.IfNull(page);
198
Throw
.ArgumentException(nameof(polygon), "A source polygon must contain at least three vertices.");
222
Throw
.ArgumentOutOfRangeException(name, "A coordinate must be finite.");
ExtractionDocumentTable.cs (14)
26
_ =
Throw
.IfLessThan(rowCount, 0);
27
_ =
Throw
.IfLessThan(columnCount, 0);
55
Content =
Throw
.IfNull(content);
56
RowSpan =
Throw
.IfLessThan(rowSpan, 1);
57
ColumnSpan =
Throw
.IfLessThan(columnSpan, 1);
58
Role = role is null ? null :
Throw
.IfNullOrWhitespace(role);
64
RowSpan =
Throw
.IfLessThan(rowSpan, 1);
65
ColumnSpan =
Throw
.IfLessThan(columnSpan, 1);
66
Role = role is null ? null :
Throw
.IfNullOrWhitespace(role);
244
Throw
.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));