Browse Source

Rename IConfigurable

af/octree-no-pixelmap
James Jackson-South 6 years ago
parent
commit
158d610b51
  1. 8
      src/ImageSharp/Advanced/AdvancedImageExtensions.cs
  2. 4
      src/ImageSharp/Advanced/IConfigurationProvider.cs
  3. 4
      src/ImageSharp/Image.cs
  4. 4
      src/ImageSharp/ImageFrame.cs

8
src/ImageSharp/Advanced/AdvancedImageExtensions.cs

@ -29,7 +29,7 @@ namespace SixLabors.ImageSharp.Advanced
/// <param name="source">The source image.</param>
/// <returns>Returns the configuration.</returns>
public static Configuration GetConfiguration(this Image source)
=> GetConfiguration((IConfigurable)source);
=> GetConfiguration((IConfigurationProvider)source);
/// <summary>
/// Gets the configuration for the image frame.
@ -37,14 +37,14 @@ namespace SixLabors.ImageSharp.Advanced
/// <param name="source">The source image.</param>
/// <returns>Returns the configuration.</returns>
public static Configuration GetConfiguration(this ImageFrame source)
=> GetConfiguration((IConfigurable)source);
=> GetConfiguration((IConfigurationProvider)source);
/// <summary>
/// Gets the configuration .
/// </summary>
/// <param name="source">The source image</param>
/// <returns>Returns the bounds of the image</returns>
private static Configuration GetConfiguration(IConfigurable source)
private static Configuration GetConfiguration(IConfigurationProvider source)
=> source?.Configuration ?? Configuration.Default;
/// <summary>
@ -174,7 +174,7 @@ namespace SixLabors.ImageSharp.Advanced
/// </summary>
/// <param name="source">The source image.</param>
/// <returns>Returns the configuration.</returns>
internal static MemoryAllocator GetMemoryAllocator(this IConfigurable source)
internal static MemoryAllocator GetMemoryAllocator(this IConfigurationProvider source)
=> GetConfiguration(source).MemoryAllocator;
/// <summary>

4
src/ImageSharp/Advanced/IConfigurable.cs → src/ImageSharp/Advanced/IConfigurationProvider.cs

@ -4,9 +4,9 @@
namespace SixLabors.ImageSharp.Advanced
{
/// <summary>
/// Encapsulates the properties for configuration.
/// Defines the contract for objects that can provide access to configuration.
/// </summary>
internal interface IConfigurable
internal interface IConfigurationProvider
{
/// <summary>
/// Gets the configuration which allows altering default behaviour or extending the library.

4
src/ImageSharp/Image.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp
/// For the non-generic <see cref="Image"/> type, the pixel type is only known at runtime.
/// <see cref="Image"/> is always implemented by a pixel-specific <see cref="Image{TPixel}"/> instance.
/// </summary>
public abstract partial class Image : IImage, IConfigurable
public abstract partial class Image : IImage, IConfigurationProvider
{
private Size size;
private readonly Configuration configuration;
@ -74,7 +74,7 @@ namespace SixLabors.ImageSharp
public ImageFrameCollection Frames => this.NonGenericFrameCollection;
/// <inheritdoc/>
Configuration IConfigurable.Configuration => this.configuration;
Configuration IConfigurationProvider.Configuration => this.configuration;
/// <inheritdoc />
public void Dispose()

4
src/ImageSharp/ImageFrame.cs

@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp
/// In case of animated formats like gif, it contains the single frame in a animation.
/// In all other cases it is the only frame of the image.
/// </summary>
public abstract partial class ImageFrame : IConfigurable, IDisposable
public abstract partial class ImageFrame : IConfigurationProvider, IDisposable
{
private readonly Configuration configuration;
@ -51,7 +51,7 @@ namespace SixLabors.ImageSharp
public ImageFrameMetadata Metadata { get; }
/// <inheritdoc/>
Configuration IConfigurable.Configuration => this.configuration;
Configuration IConfigurationProvider.Configuration => this.configuration;
/// <summary>
/// Gets the size of the frame.

Loading…
Cancel
Save