Skip to content

Commit

Permalink
Updated XML documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmester committed Sep 19, 2021
1 parent 0121b53 commit d1ca1cf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/PdfToSvg/IO/StreamExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public static byte[] GetBufferOrArray(this MemoryStream stream)
/// <summary>
/// Writes all bytes from a specified buffer to the stream.
/// </summary>
/// <param name="stream">Target stream.</param>
/// <param name="buffer">Buffer whose content will be written to the stream.</param>
[MethodImpl(MethodInliningOptions.AggressiveInlining)]
public static void Write(this Stream stream, byte[] buffer)
Expand All @@ -155,7 +156,9 @@ public static void Write(this Stream stream, byte[] buffer)
/// <summary>
/// Asynchronously writes all bytes from a specified buffer to the stream.
/// </summary>
/// <param name="stream">Target stream.</param>
/// <param name="buffer">Buffer whose content will be written to the stream.</param>
/// <param name="cancellationToken">Token for monitoring cancellation requests.</param>
[MethodImpl(MethodInliningOptions.AggressiveInlining)]
public static Task WriteAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default)
{
Expand Down
6 changes: 4 additions & 2 deletions src/PdfToSvg/PdfDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ internal PdfDocument(InputFile file, PdfDictionary? trailer, DocumentPermissions
/// <returns><see cref="PdfDocument"/> for the specified stream.</returns>
/// <exception cref="ArgumentException"><paramref name="stream"/> is not readable and/or seekable.</exception>
/// <exception cref="ArgumentNullException"><paramref name="stream"/> is <c>null</c>.</exception>
/// <exception cref="EncryptedPdfException">The PDF file is encrypted. Encrypted PDFs are currently not supported.</exception>
/// <exception cref="InvalidCredentialException">The input PDF is encrypted, but an incorrect password was specified, or not specified at all.</exception>
/// <exception cref="PdfException">The input PDF could not be parsed.</exception>
public static PdfDocument Open(Stream stream, bool leaveOpen = false, OpenOptions? options = null, CancellationToken cancellationToken = default)
{
if (stream == null) throw new ArgumentNullException(nameof(stream));
Expand All @@ -95,7 +96,8 @@ public static PdfDocument Open(Stream stream, bool leaveOpen = false, OpenOption
/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception>
/// <exception cref="IOException">An IO error occured while reading the file.</exception>
/// <exception cref="FileNotFoundException">No file was found at <paramref name="path"/>.</exception>
/// <exception cref="EncryptedPdfException">The PDF file is encrypted. Encrypted PDFs are currently not supported.</exception>
/// <exception cref="InvalidCredentialException">The input PDF is encrypted, but an incorrect password was specified, or not specified at all.</exception>
/// <exception cref="PdfException">The input PDF could not be parsed.</exception>
public static PdfDocument Open(string path, OpenOptions? options = null, CancellationToken cancellationToken = default)
{
if (path == null) throw new ArgumentNullException(nameof(path));
Expand Down
1 change: 1 addition & 0 deletions src/PdfToSvg/Security/SecurityHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ internal abstract class SecurityHandler
/// </summary>
/// <param name="trailerDict">Trailer dictionary before object inlining.</param>
/// <param name="encryptDict">Encryption dictionary.</param>
/// <param name="options">Options passed to <see cref="PdfDocument.Open(Stream, bool, OpenOptions?, System.Threading.CancellationToken)"/>.</param>
public static SecurityHandler Create(PdfDictionary trailerDict, PdfDictionary encryptDict, OpenOptions options)
{
var securityHandler = encryptDict.GetValueOrDefault(Names.Filter, Names.Standard);
Expand Down

0 comments on commit d1ca1cf

Please sign in to comment.