|
1 | | -using System.Runtime.Serialization; |
2 | | - |
3 | 1 | namespace SharpHook; |
4 | 2 |
|
5 | 3 | /// <summary> |
@@ -69,34 +67,6 @@ public HookException(UioHookResult result, string message, Exception innerExcept |
69 | 67 | : base(message, innerException) => |
70 | 68 | this.Result = result; |
71 | 69 |
|
72 | | -#if NET8_0_OR_GREATER |
73 | | - [Obsolete( |
74 | | - "This API supports obsolete formatter-based serialization. " + |
75 | | - "It should not be called or extended by application code.", |
76 | | - DiagnosticId = "SYSLIB0051")] |
77 | | -#endif |
78 | | - private HookException(SerializationInfo info, StreamingContext context) |
79 | | - : base(info, context) => |
80 | | - this.Result = (UioHookResult) |
81 | | - (info.GetValue(nameof(this.Result), typeof(UioHookResult)) ?? UioHookResult.Failure); |
82 | | - |
83 | | - /// <summary> |
84 | | - /// Sets the <see cref="SerializationInfo" /> with information about this exception. |
85 | | - /// </summary> |
86 | | - /// <param name="info">The serialization info to set.</param> |
87 | | - /// <param name="context">The streaming context.</param> |
88 | | -#if NET8_0_OR_GREATER |
89 | | - [Obsolete( |
90 | | - "This API supports obsolete formatter-based serialization. " + |
91 | | - "It should not be called or extended by application code.", |
92 | | - DiagnosticId = "SYSLIB0051")] |
93 | | -#endif |
94 | | - public override void GetObjectData(SerializationInfo info, StreamingContext context) |
95 | | - { |
96 | | - base.GetObjectData(info, context); |
97 | | - info.AddValue(nameof(Result), this.Result); |
98 | | - } |
99 | | - |
100 | 70 | /// <summary> |
101 | 71 | /// Gets the result of an opetaion which caused this exception. |
102 | 72 | /// </summary> |
|
0 commit comments