From 2cf8762128085aa86c62240efc0661a77923ab29 Mon Sep 17 00:00:00 2001 From: Richard Webb Date: Mon, 6 May 2024 15:24:02 +0100 Subject: [PATCH] Conditionalize the formatter based serialization bits in InvalidFontFormatException --- src/UglyToad.PdfPig.Fonts/InvalidFontFormatException.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/UglyToad.PdfPig.Fonts/InvalidFontFormatException.cs b/src/UglyToad.PdfPig.Fonts/InvalidFontFormatException.cs index d742efc7..8602728e 100644 --- a/src/UglyToad.PdfPig.Fonts/InvalidFontFormatException.cs +++ b/src/UglyToad.PdfPig.Fonts/InvalidFontFormatException.cs @@ -1,14 +1,18 @@ namespace UglyToad.PdfPig.Fonts { using System; +#if !NET using System.Runtime.Serialization; +#endif /// /// The exception thrown when an error is encountered parsing a font from the PDF document. /// This occurs where the format of the font program or dictionary does not meet the specification. /// /// +#if !NET [Serializable] +#endif public class InvalidFontFormatException : Exception { /// @@ -26,11 +30,13 @@ { } +#if !NET /// protected InvalidFontFormatException( SerializationInfo info, StreamingContext context) : base(info, context) { } +#endif } }