Please consider the following interfaces:
interface IFile
{
// Members
};
interface IAudioFile : IFile
{
// Members
};
interface IVideoFile : IFile
{
// Members
};
enum ContentType
{
Audio,
Video
};
interface IProvider
{
HashSet<ContentType> GetSupportedTypes();
IList<IFile> GetFiles(ContentType contentType);
};
I think that ContentType enumeration is redundant. Is there any way to use something like interface identifier instead of enumeration type?
Any comments on the interface design are very appreciated.