File tree 2 files changed +19
-0
lines changed
src/ICSharpCode.SharpZipLib/Tar
test/ICSharpCode.SharpZipLib.Tests/Serialization
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . Runtime . Serialization ;
2
3
3
4
namespace ICSharpCode . SharpZipLib . Tar
4
5
{
5
6
/// <summary>
6
7
/// This exception is used to indicate that there is a problem
7
8
/// with a TAR archive header.
8
9
/// </summary>
10
+ [ Serializable ]
9
11
public class InvalidHeaderException : TarException
10
12
{
11
13
/// <summary>
@@ -33,5 +35,21 @@ public InvalidHeaderException(string message, Exception exception)
33
35
: base ( message , exception )
34
36
{
35
37
}
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
+ }
36
54
}
37
55
}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public class SerializationTests
23
23
[ Category ( "Serialization" ) ]
24
24
[ TestCase ( typeof ( BZip2Exception ) ) ]
25
25
[ TestCase ( typeof ( GZipException ) ) ]
26
+ [ TestCase ( typeof ( InvalidHeaderException ) ) ]
26
27
[ TestCase ( typeof ( InvalidNameException ) ) ]
27
28
[ TestCase ( typeof ( LzwException ) ) ]
28
29
[ TestCase ( typeof ( SharpZipBaseException ) ) ]
You can’t perform that action at this time.
0 commit comments