diff --git a/src/ImageSharp/Formats/IImageFormat.cs b/src/ImageSharp/Formats/IImageFormat.cs
index 9720352750..94191c1493 100644
--- a/src/ImageSharp/Formats/IImageFormat.cs
+++ b/src/ImageSharp/Formats/IImageFormat.cs
@@ -6,26 +6,36 @@ using System.Collections.Generic;
namespace SixLabors.ImageSharp.Formats
{
///
- /// Defines the contract for an image format containing metadata with multiple frames.
+ /// Defines the contract for an image format.
///
- /// The type of format metadata.
- /// The type of format frame metadata.
- public interface IImageFormat : IImageFormat
- where TFormatMetaData : class
- where TFormatFrameMetaData : class
+ public interface IImageFormat
{
///
- /// Creates a default instance of the format frame metadata.
+ /// Gets the name that describes this image format.
///
- /// The .
- TFormatFrameMetaData CreateDefaultFormatFrameMetaData();
+ string Name { get; }
+
+ ///
+ /// Gets the default mimetype that the image foramt uses
+ ///
+ string DefaultMimeType { get; }
+
+ ///
+ /// Gets all the mimetypes that have been used by this image foramt.
+ ///
+ IEnumerable MimeTypes { get; }
+
+ ///
+ /// Gets the file extensions this image format commonly uses.
+ ///
+ IEnumerable FileExtensions { get; }
}
///
/// Defines the contract for an image format containing metadata.
///
/// The type of format metadata.
- public interface IImageFormat : IImageFormat
+ public interface IImageFormat : IImageFormat
where TFormatMetaData : class
{
///
@@ -36,28 +46,18 @@ namespace SixLabors.ImageSharp.Formats
}
///
- /// Defines the contract for an image format.
+ /// Defines the contract for an image format containing metadata with multiple frames.
///
- public interface IImageFormat
+ /// The type of format metadata.
+ /// The type of format frame metadata.
+ public interface IImageFormat : IImageFormat
+ where TFormatMetaData : class
+ where TFormatFrameMetaData : class
{
///
- /// Gets the name that describes this image format.
- ///
- string Name { get; }
-
- ///
- /// Gets the default mimetype that the image foramt uses
- ///
- string DefaultMimeType { get; }
-
- ///
- /// Gets all the mimetypes that have been used by this image foramt.
- ///
- IEnumerable MimeTypes { get; }
-
- ///
- /// Gets the file extensions this image format commonly uses.
+ /// Creates a default instance of the format frame metadata.
///
- IEnumerable FileExtensions { get; }
+ /// The .
+ TFormatFrameMetaData CreateDefaultFormatFrameMetaData();
}
}
\ No newline at end of file
diff --git a/src/ImageSharp/MetaData/ImageFrameMetaData.cs b/src/ImageSharp/MetaData/ImageFrameMetaData.cs
index 07d4bdb05e..908a0e6246 100644
--- a/src/ImageSharp/MetaData/ImageFrameMetaData.cs
+++ b/src/ImageSharp/MetaData/ImageFrameMetaData.cs
@@ -12,7 +12,7 @@ namespace SixLabors.ImageSharp.MetaData
///
public sealed class ImageFrameMetaData
{
- private readonly Dictionary metaData = new Dictionary();
+ private readonly Dictionary formatMetaData = new Dictionary();
///
/// Initializes a new instance of the class.
@@ -32,9 +32,9 @@ namespace SixLabors.ImageSharp.MetaData
{
DebugGuard.NotNull(other, nameof(other));
- foreach (KeyValuePair meta in other.metaData)
+ foreach (KeyValuePair meta in other.formatMetaData)
{
- this.metaData.Add(meta.Key, meta.Value);
+ this.formatMetaData.Add(meta.Key, meta.Value);
}
}
@@ -54,13 +54,15 @@ namespace SixLabors.ImageSharp.MetaData
/// key is null.
/// value is null.
/// An element with the same key already exists in the .
- public void AddOrUpdateFormatMetaData(IImageFormat key, TFormatFrameMetaData value)
+ public void AddOrUpdateFormatMetaData(
+ IImageFormat key,
+ TFormatFrameMetaData value)
where TFormatMetaData : class
where TFormatFrameMetaData : class
{
// Don't think this needs to be threadsafe.
Guard.NotNull(value, nameof(value));
- this.metaData[key] = value;
+ this.formatMetaData[key] = value;
}
///
@@ -76,7 +78,7 @@ namespace SixLabors.ImageSharp.MetaData
where TFormatMetaData : class
where TFormatFrameMetaData : class
{
- if (this.metaData.TryGetValue(key, out object meta))
+ if (this.formatMetaData.TryGetValue(key, out object meta))
{
return (TFormatFrameMetaData)meta;
}
diff --git a/src/ImageSharp/MetaData/ImageMetaData.cs b/src/ImageSharp/MetaData/ImageMetaData.cs
index aa084728ca..74c00cf8a5 100644
--- a/src/ImageSharp/MetaData/ImageMetaData.cs
+++ b/src/ImageSharp/MetaData/ImageMetaData.cs
@@ -26,7 +26,7 @@ namespace SixLabors.ImageSharp.MetaData
///
public const double DefaultVerticalResolution = 96;
- private readonly Dictionary metaData = new Dictionary();
+ private readonly Dictionary formatMetaData = new Dictionary();
private double horizontalResolution;
private double verticalResolution;
@@ -52,9 +52,9 @@ namespace SixLabors.ImageSharp.MetaData
this.VerticalResolution = other.VerticalResolution;
this.ResolutionUnits = other.ResolutionUnits;
- foreach (KeyValuePair meta in other.metaData)
+ foreach (KeyValuePair meta in other.formatMetaData)
{
- this.metaData.Add(meta.Key, meta.Value);
+ this.formatMetaData.Add(meta.Key, meta.Value);
}
foreach (ImageProperty property in other.Properties)
@@ -145,7 +145,7 @@ namespace SixLabors.ImageSharp.MetaData
{
// Don't think this needs to be threadsafe.
Guard.NotNull(value, nameof(value));
- this.metaData[key] = value;
+ this.formatMetaData[key] = value;
}
///
@@ -159,7 +159,7 @@ namespace SixLabors.ImageSharp.MetaData
public TFormatMetaData GetOrAddFormatMetaData(IImageFormat key)
where TFormatMetaData : class
{
- if (this.metaData.TryGetValue(key, out object meta))
+ if (this.formatMetaData.TryGetValue(key, out object meta))
{
return (TFormatMetaData)meta;
}