Skip to content

Commit d14693a

Browse files
committed
Changed TimeSpan to CancellationToken for Block.Measure
1 parent a67bee1 commit d14693a

File tree

1 file changed

+4
-1
lines changed
  • libraries/radpdfprocessing/editing

1 file changed

+4
-1
lines changed

libraries/radpdfprocessing/editing/block.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,10 @@ The code in __Example 9__ splits a block in two. The first will contains text "H
256256

257257
//Size size = block.Measure(helloSize); //This method is obsolete since Q4 2024.
258258

259-
Size size = block.Measure(helloSize, TimeSpan.FromSeconds(10));
259+
CancellationTokenSource cancellationTokenSource = new(TimeSpan.FromSeconds(10));
260+
CancellationToken cancellationToken = cancellationTokenSource.Token;
261+
262+
Size size = block.Measure(helloSize, cancellationToken);
260263

261264
Block secondBlock = block.Split();
262265
{{endregion}}

0 commit comments

Comments
 (0)