Skip to content

Commit

Permalink
Remove obsolete serialization support on .NET
Browse files Browse the repository at this point in the history
  • Loading branch information
iamcarbon committed May 1, 2024
1 parent 8281692 commit e2715ed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/UglyToad.PdfPig.Fonts/CorruptCompressedDataException.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
namespace UglyToad.PdfPig.Fonts
{
using System;
#if !NET
using System.Runtime.Serialization;
#endif

/// <summary>
/// Thrown when a PDF contains an invalid compressed data stream.
/// </summary>
#if !NET
[Serializable]
#endif
public class CorruptCompressedDataException : Exception
{
/// <inheritdoc />
Expand All @@ -24,11 +28,13 @@ public CorruptCompressedDataException(string message, Exception inner) : base(me
{
}

#if !NET
/// <inheritdoc />
protected CorruptCompressedDataException(
SerializationInfo info,
StreamingContext context) : base(info, context)
{
}
#endif
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
namespace UglyToad.PdfPig.Exceptions
{
using System;
#if !NET
using System.Runtime.Serialization;
#endif
using Encryption;

/// <inheritdoc />
/// <summary>
/// The document is encrypted and cannot be decrypted.
/// </summary>
#if !NET
[Serializable]
#endif
public class PdfDocumentEncryptedException : Exception
{
internal EncryptionDictionary? Dictionary { get; }
Expand Down Expand Up @@ -38,11 +42,13 @@ internal PdfDocumentEncryptedException(string message, EncryptionDictionary dict
Dictionary = dictionary;
}

#if !NET
/// <inheritdoc />
protected PdfDocumentEncryptedException(
SerializationInfo info,
StreamingContext context) : base(info, context)
{
}
#endif
}
}

0 comments on commit e2715ed

Please sign in to comment.