File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
src/ICSharpCode.SharpZipLib/Tar
test/ICSharpCode.SharpZipLib.Tests/Serialization Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 11using System ;
2+ using System . Runtime . Serialization ;
23
34namespace ICSharpCode . SharpZipLib . Tar
45{
56 /// <summary>
67 /// This exception is used to indicate that there is a problem
78 /// with a TAR archive header.
89 /// </summary>
10+ [ Serializable ]
911 public class InvalidHeaderException : TarException
1012 {
1113 /// <summary>
@@ -33,5 +35,21 @@ public InvalidHeaderException(string message, Exception exception)
3335 : base ( message , exception )
3436 {
3537 }
38+
39+ /// <summary>
40+ /// Initializes a new instance of the InvalidHeaderException class with serialized data.
41+ /// </summary>
42+ /// <param name="info">
43+ /// The System.Runtime.Serialization.SerializationInfo that holds the serialized
44+ /// object data about the exception being thrown.
45+ /// </param>
46+ /// <param name="context">
47+ /// The System.Runtime.Serialization.StreamingContext that contains contextual information
48+ /// about the source or destination.
49+ /// </param>
50+ protected InvalidHeaderException ( SerializationInfo info , StreamingContext context )
51+ : base ( info , context )
52+ {
53+ }
3654 }
3755}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public class SerializationTests
2323 [ Category ( "Serialization" ) ]
2424 [ TestCase ( typeof ( BZip2Exception ) ) ]
2525 [ TestCase ( typeof ( GZipException ) ) ]
26+ [ TestCase ( typeof ( InvalidHeaderException ) ) ]
2627 [ TestCase ( typeof ( InvalidNameException ) ) ]
2728 [ TestCase ( typeof ( LzwException ) ) ]
2829 [ TestCase ( typeof ( SharpZipBaseException ) ) ]
You can’t perform that action at this time.
0 commit comments