Browse Source

remove explicit backing fields for property bags

pull/1176/head
Scott Williams 6 years ago
parent
commit
d38764dba2
  1. 4
      src/ImageSharp/Configuration.cs
  2. 3
      src/ImageSharp/Processing/DefaultImageProcessorContext{TPixel}.cs

4
src/ImageSharp/Configuration.cs

@ -28,8 +28,6 @@ namespace SixLabors.ImageSharp
private int maxDegreeOfParallelism = Environment.ProcessorCount;
private Dictionary<object, object> properties = new Dictionary<object, object>();
/// <summary>
/// Initializes a new instance of the <see cref="Configuration" /> class.
/// </summary>
@ -80,7 +78,7 @@ namespace SixLabors.ImageSharp
/// Gets a set of properties for the Congiguration.
/// </summary>
/// <remarks>This can be used for storing global settings and defaults to be accessable to processors.</remarks>
public IDictionary<object, object> Properties => this.properties;
public IDictionary<object, object> Properties { get; } = new Dictionary<object, object>();
/// <summary>
/// Gets the currently registered <see cref="IImageFormat"/>s.

3
src/ImageSharp/Processing/DefaultImageProcessorContext{TPixel}.cs

@ -16,7 +16,6 @@ namespace SixLabors.ImageSharp.Processing
{
private readonly bool mutate;
private readonly Image<TPixel> source;
private readonly Dictionary<object, object> properties = new Dictionary<object, object>();
private Image<TPixel> destination;
/// <summary>
@ -42,7 +41,7 @@ namespace SixLabors.ImageSharp.Processing
public Configuration Configuration { get; }
/// <inheritdoc/>
public IDictionary<object, object> Properties => this.properties;
public IDictionary<object, object> Properties { get; } = new Dictionary<object, object>();
/// <inheritdoc/>
public Image<TPixel> GetResultImage()

Loading…
Cancel
Save