@@ -16,9 +16,9 @@ public sealed class DecoderOptions
16
16
private uint maxFrames = int . MaxValue ;
17
17
18
18
// Used by the FileProvider in the unit tests to set the configuration on the fly.
19
- #pragma warning disable SA1401 // Fields should be private
20
- internal Configuration BackingConfiguration = Configuration . Default ;
21
- #pragma warning restore SA1401 // Fields should be private
19
+ #pragma warning disable IDE0032 // Use auto property
20
+ private Configuration configuration = Configuration . Default ;
21
+ #pragma warning restore IDE0032 // Use auto property
22
22
23
23
/// <summary>
24
24
/// Gets the shared default general decoder options instance.
@@ -29,7 +29,11 @@ public sealed class DecoderOptions
29
29
/// <summary>
30
30
/// Gets a custom configuration instance to be used by the image processing pipeline.
31
31
/// </summary>
32
- public Configuration Configuration { get => this . BackingConfiguration ; init => this . BackingConfiguration = value ; }
32
+ #pragma warning disable IDE0032 // Use auto property
33
+ #pragma warning disable RCS1085 // Use auto-implemented property.
34
+ public Configuration Configuration { get => this . configuration ; init => this . configuration = value ; }
35
+ #pragma warning restore RCS1085 // Use auto-implemented property.
36
+ #pragma warning restore IDE0032 // Use auto property
33
37
34
38
/// <summary>
35
39
/// Gets the target size to decode the image into. Scaling should use an operation equivalent to <see cref="ResizeMode.Max"/>.
@@ -50,10 +54,6 @@ public sealed class DecoderOptions
50
54
/// Gets the maximum number of image frames to decode, inclusive.
51
55
/// </summary>
52
56
public uint MaxFrames { get => this . maxFrames ; init => this . maxFrames = Math . Clamp ( value , 1 , int . MaxValue ) ; }
53
- }
54
57
55
- internal static class DecoderOptionsExtensions
56
- {
57
- public static void SetConfiguration ( this DecoderOptions options , Configuration configuration )
58
- => options . BackingConfiguration = configuration ;
58
+ internal void SetConfiguration ( Configuration configuration ) => this . configuration = configuration ;
59
59
}
0 commit comments