-
This is something that I didn't consider:
My point is, this code doesn't explicitly define a no-argument public constructor, which will trip the CSLA0003 analyzer. But, I believe the C# compiler will automatically add this constructor in if you haven't defined any constructors in a class. So I think I might need to be a bit more cautious with this analyzer. If you have no constructors defined, you should be OK. Thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I agree. Defining no ctor at all means C# adds a default ctor, and that meets the requirement for CSLA serialization. |
Beta Was this translation helpful? Give feedback.
-
Never mind :). I just wrote this:
And I got no analyzer errors. So I must be handling this condition. |
Beta Was this translation helpful? Give feedback.
Never mind :). I just wrote this:
And I got no analyzer errors. So I must be handling this condition.