ISafeSerializationData Interface
.NET Framework (current version)
Enables serialization of custom exception data in security-transparent code.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() | CompleteDeserialization(Object^) | This method is called when the instance is deserialized. |
In versions previous to.NET Framework 4.0, serialization of custom user data in a security transparent code was accomplished using the GetObjectData method. Starting with .NET Framework 4.0, that method is marked with the SecurityCriticalAttribute attribute which prevents execution in security-transparent code. To work around this condition, implement the ISafeSerializationData interface and add custom data as shown in the example below.
The CompleteDeserialization method is called after serialization, and uses the SafeSerializationEventArgs to restore the custom data.
.NET Framework
Available since 4.0
Available since 4.0
Show:
