This project is read-only.
1
Vote

Doesn't work with property.

description

Hi, I found that this extension doesn't work properly with properties.

For this code, Exceptional suggests "Exception 'IOException' is not documented." (+2 more suggestions):
public string Prop1 {
    get {
        Directory.CreateDirectory("");
        return "";
    }
}
After adding documentation for IOException according to this suggestion:
/// <exception cref="IOException" accessor="get">The directory specified by <paramref name="path" /> is a file.-or-The network name is not known.</exception>
public string Prop1 {
    get {
        Directory.CreateDirectory("");
        return "";
    }
}
But the suggestion does not disappear. Seems to have failed to scanning.

comments

firehirsch wrote Oct 13, 2015 at 8:06 AM

Oh come on!
Why are you doning things like CreateDirectory() in an property?
A getter or setter should be implemented in a really simple way. If there is anything called that could lead to an exception you should not do this in a properties setter or getter. Better implement a method for that!