The ExifEnumProperty could get such a constraint, it would make the code more type-safe?
Also, one could for example have the following method on the exif collection class:
/// <summary>
/// Adds an <see cref="ExifEnumProperty{T}"/> with the specified key.
/// </summary>
/// <param name="key">The tag to set.</param>
/// <param name="value">The value of tag.</param>
public void Add<TEnum>(ExifTag key, TEnum value) where TEnum : Enum
{
AddItem(new ExifEnumProperty<TEnum>(key, value));
}
Just an idea here.
It seems that the code doesn't make use yet of the Enum constraint of C# 7
The
ExifEnumProperty
could get such a constraint, it would make the code more type-safe?Also, one could for example have the following method on the exif collection class: