From d96ec7a9afc2d398b7303bab348740e17d50f908 Mon Sep 17 00:00:00 2001
From: BobLd <38405645+BobLd@users.noreply.github.com>
Date: Sat, 8 Jun 2024 09:53:15 +0100
Subject: [PATCH] Make DirectObjectFinder public
---
src/UglyToad.PdfPig.Tests/PublicApiScannerTests.cs | 1 +
.../Parser/Parts/DirectObjectFinder.cs | 14 +++++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/UglyToad.PdfPig.Tests/PublicApiScannerTests.cs b/src/UglyToad.PdfPig.Tests/PublicApiScannerTests.cs
index 7796e324..dc387e6e 100644
--- a/src/UglyToad.PdfPig.Tests/PublicApiScannerTests.cs
+++ b/src/UglyToad.PdfPig.Tests/PublicApiScannerTests.cs
@@ -250,6 +250,7 @@
"UglyToad.PdfPig.Outline.Destinations.NamedDestinations",
"UglyToad.PdfPig.ParsingOptions",
"UglyToad.PdfPig.Parser.IPageContentParser",
+ "UglyToad.PdfPig.Parser.Parts.DirectObjectFinder",
"UglyToad.PdfPig.PdfDocument",
"UglyToad.PdfPig.PdfExtensions",
"UglyToad.PdfPig.Rendering.IPageImageRenderer",
diff --git a/src/UglyToad.PdfPig/Parser/Parts/DirectObjectFinder.cs b/src/UglyToad.PdfPig/Parser/Parts/DirectObjectFinder.cs
index 90ca5194..b88b08c2 100644
--- a/src/UglyToad.PdfPig/Parser/Parts/DirectObjectFinder.cs
+++ b/src/UglyToad.PdfPig/Parser/Parts/DirectObjectFinder.cs
@@ -5,8 +5,14 @@
using Tokenization.Scanner;
using Tokens;
- internal static class DirectObjectFinder
+ ///
+ /// Direct object finder.
+ ///
+ public static class DirectObjectFinder
{
+ ///
+ /// Try and get the token value, using the if it is a .
+ ///
public static bool TryGet(IToken? token, IPdfTokenScanner scanner, [NotNullWhen(true)] out T? tokenResult)
where T : class, IToken
{
@@ -45,6 +51,9 @@
return false;
}
+ ///
+ /// Get the token value.
+ ///
public static T? Get(IndirectReference reference, IPdfTokenScanner scanner)
where T : class, IToken
{
@@ -83,6 +92,9 @@
}
#nullable disable
+ ///
+ /// Get the token value, using the if it is a .
+ ///
public static T Get(IToken token, IPdfTokenScanner scanner) where T : class, IToken
{
if (token is T result)