-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
- Which Errors are recognized, how can they be corrected
Features to add:
- detect errors when using custom properties and fields
- dont extend ApplicationException analyzer
- recommend seal analyser
- serialization ctors can be private if class is sealed analyzer.
- codefix to make an exception serializable (add attribute and ctors and stuff for serializing fields and properties)
- codefix to add Serializable attribute
Links:
- Stackoverflow - What is the correct way to make a custom .NET Exception serializable?
- What is the correct way to make a custom .NET Exception serializable?
- Choosing the right type of exception to throw
- Serialization (C# )
- Object Serialization in the .NET Framework
- The correct way to code a custom exception class
- Walkthrough: Configuring and Using a Custom Rule Set
Related Rules:
- CA2236: Call base class methods on ISerializable types
- CA2240: Implement ISerializable correctly
- CA2229: Implement serialization constructors
- CA2238: Implement serialization methods correctly
- CA2235: Mark all non-serializable fields
- CA2239: Provide deserialization methods for optional fields
- CA2120: Secure serialization constructors
- CA1032: Implement standard exception constructors
- CA2237: Mark ISerializable types with SerializableAttribute
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels