rspec/rules/S3927/description.adoc

8 lines
706 B
Plaintext
Raw Normal View History

2020-06-30 12:48:39 +02:00
Serialization event handlers that don't have the correct signature will simply not be called, thus bypassing any attempts to augment the automated de/serialization.
This rule raises issue when a method marked with one of the following attributes is not <code>private</code>, does not return <code>void</code>, has type parameters, or does not have a single parameter of type <code>System.Runtime.Serialization.StreamingContext</code>:
* <code>System.Runtime.Serialization.OnSerializingAttribute</code>
* <code>System.Runtime.Serialization.OnSerializedAttribute</code>
* <code>System.Runtime.Serialization.OnDeserializingAttribute</code>
* <code>System.Runtime.Serialization.OnDeserializedAttribute</code>