Enable StyleCop analyzer and fix existing issues

This commit is contained in:
Mark Monteiro
2019-12-14 11:04:22 +01:00
parent b8c8d45b8d
commit 2c3e1b8562
5 changed files with 27 additions and 14 deletions

View File

@@ -10,12 +10,6 @@ namespace Jellyfin.Drawing.Skia
[SuppressMessage("Design", "CA1032:Implement standard exception constructors", Justification = "A custom property, CodecResult, is required when creating this exception type.")]
public class SkiaCodecException : SkiaException
{
/// <summary>
/// Returns the non-successful codec result returned by Skia.
/// </summary>
/// <value>The non-successful codec result returned by Skia.</value>
public SKCodecResult CodecResult { get; }
/// <summary>
/// Initializes a new instance of the <see cref="SkiaCodecException" /> class.
/// </summary>
@@ -37,12 +31,17 @@ namespace Jellyfin.Drawing.Skia
CodecResult = result;
}
/// <summary>
/// Gets the non-successful codec result returned by Skia.
/// </summary>
public SKCodecResult CodecResult { get; }
/// <inheritdoc />
public override string ToString()
=> string.Format(
CultureInfo.InvariantCulture,
"Non-success codec result: {0}\n{1}",
CodecResult,
base.ToString());
base.ToString());
}
}