We have sonar reports that says many of the classes in our projects violates the MissingSerializationConstructorRule, however neither the class nor its base class implement any of the Iserializable interface, anyone has any idea why?
for example, sonar says:
public class CommentPage : RmdsPublicationPage, ICommentPage
{
*MissingSerializationConstructorRule
The required constructor for ISerializable is not present in this type.*
public CommentPage()
{
this["COMMENTTXT"] = null;
where the corresponding class is
public class CommentPage : RmdsPublicationPage, ICommentPage
{
public CommentPage()
{
// do something
}
public void Update(string comment)
{
//something else
}
}
Two interfaces does not implement ISerializable either, i.e.
public class RmdsPublicationPage : Dictionary<string, object>, IRmdsPublicationPage
public interface IRmdsPublicationPage : IDictionary<string, object>, IDisposable
Dictionary(TKey, TValue) implements ISerializable