Configuration File - Erroroneous Module Qualification Required Suggestion Follow
I am getting what I believe to be an erroneous suggestion from Resharper in my Web.config file in regards to the attribute value of a custom configuration section element.
The ThumbnailResolutionElement defined in my application has the "type" attribute set to an Enum value so the value in the attribute should be a string representation of the enum value and nothing more.
public class ThumbnailResolutionElement : ConfigurationElement
{
public ThumbnailResolutionElement(ImageResizer.ThumbnailType type, int height, int width) {
Type = type;
Height = height;
Width = width;
}
public ThumbnailResolutionElement() { }
[ConfigurationProperty("type", IsRequired = true, IsKey = true)]
public ImageResizer.ThumbnailType Type {
get { return (ImageResizer.ThumbnailType)this["type"]; }
set { this["type"] = value; }
}
[ConfigurationProperty("width", IsRequired = true, DefaultValue = 280)]
public int Width {
get { return (int)this["width"]; }
set { this["width"] = value; }
}
[ConfigurationProperty("height", IsRequired = true, DefaultValue = 280)]
public int Height {
get { return (int)this["height"]; }
set { this["height"] = value; }
}
}
public static class ImageResizer
{
public enum ThumbnailType
{
/// <summary>
/// Original Image
/// </summary>
FullSize = 0,
/// <summary>
/// 115px x 115px
/// </summary>
SearchSmall = 1,
/// <summary>
/// 160px x 160px
/// </summary>
SearchBig = 2,
/// <summary>
/// 30px x 30px
/// </summary>
DetailsSmall = 3,
/// <summary>
/// 75px x 75px
/// </summary>
DetailsMedium = 4,
/// <summary>
/// 280px x 280px
/// </summary>
DetailsBig = 5,
}
}
Please sign in to leave a comment.
Hi Nathan, did you get any feedback on this? I've got the same problem and it's still not resolved in 5.1.1.
I've create an issue in youTrack http://youtrack.jetbrains.net/issue/RSRP-190073 so you'll be able to track its progress. I don't think we'll be able to fix the issue in 5.1.x bugfix update but will definitely fix in the next upcoming release.