Serialization Inspections is simple ReSharper extension which adds the following inspections for binary serializable types.
-
"Missing [Serializable] attribute" warning
- For classes derived from
Exception
but without the[Serializable]
attribute. - For types directly implementing
ISerializable
but without the[Serializable]
attribute. - This warning also offers a quick fix (Alt+Enter) to generate the attribute.
- For classes derived from
-
"Missing deserialization constructor" warning
- For
[Serializable]
types which are derived fromISerializable
but have no deserialization constructor (likeprotected MyClass(SerializationInfo info, StreamingContext context)
). - This warning also offers a quick fix (Alt+Enter) to generate the constructor.
- For