DocumentPaginator.ComputePageCountAsync Method

Definition

Asynchronously, forces a pagination of the content, updates PageCount with the new total, and sets IsPageCountValid to true.

Overloads

ComputePageCountAsync()

Asynchronously, forces a pagination of the content, updates PageCount with the new total, and sets IsPageCountValid to true.

ComputePageCountAsync(Object)

Asynchronously, forces a pagination of the content, updates PageCount with the new total, sets IsPageCountValid to true.

ComputePageCountAsync()

Asynchronously, forces a pagination of the content, updates PageCount with the new total, and sets IsPageCountValid to true.

C#
public virtual void ComputePageCountAsync();

Remarks

The only way to cancel the asynchronous operation of this method is to cancel all asynchronous operations. Contrast this with the other overload of this method: ComputePageCountAsync(Object).

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by ComputePageCount().

Applies to

.NET Framework 4.8.1 a ďalšie verzie
Produkt Verzie
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

ComputePageCountAsync(Object)

Asynchronously, forces a pagination of the content, updates PageCount with the new total, sets IsPageCountValid to true.

C#
public virtual void ComputePageCountAsync(object userState);

Parameters

userState
Object

A unique identifier for the asynchronous task.

Remarks

The specified ID is assigned to the asynchronous task.

This overload of the method makes it possible to cancel this asynchronous operation without cancelling all asynchronous operations.

Applies to

.NET Framework 4.8.1 a ďalšie verzie
Produkt Verzie
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10