OfficePageSelector
OfficeIMO
Represents a document-relative, caller-ordered page selection expression.
Inheritance
- object
- OfficePageSelector
Remarks
Selectors are resolved against a document page count. Supported terms include absolute pages and ranges (1, 1-3, 5..2), end-relative pages (last, last-2), all, odd, even, and exclusions prefixed with !.
Usage
Explore 4 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 2
- Property OfficeImageExportOptions.PageSelector
- Method OfficePageSelector.Parse
Accepted by parameters 2
- Method OfficePageSelector.Equals
- Method OfficePageSelector.TryParse
Methods
public bool Equals(OfficePageSelector? other) #Indicates whether the current object is equal to another object of the same type.
Parameters
- other OfficeIMO.OfficePageSelector?
- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.public override bool Equals(object? obj) #Determines whether the specified object is equal to the current object.
Parameters
- obj object?
- The object to compare with the current object.
Returns
bool true if the specified object is equal to the current object; otherwise, false.public override int GetHashCode() #Serves as the default hash function.
Returns
int A hash code for the current object.public static OfficePageSelector Parse(string expression) #Parses a document-relative page selector.
Parameters
- expression string
Returns
OfficePageSelectorpublic IReadOnlyList<int> Resolve(int pageCount) #Resolves the selector to caller-ordered, one-based page numbers.
Parameters
- pageCount int
Returns
IReadOnlyList<int>public IReadOnlyList<int> Resolve(int pageCount, int maximumPages) #Resolves the ordered selection, rejecting it before retaining more than the supplied page budget.
Parameters
- pageCount int
- maximumPages int
Returns
IReadOnlyList<int>public override string ToString() #Returns a string that represents the current object.
Returns
string A string that represents the current object.public static bool TryParse(string? expression, out OfficePageSelector? selector) #Attempts to parse a document-relative page selector.
Parameters
- expression string?
- selector OfficeIMO.OfficePageSelector?
Returns
bool