Abstract class instantiation

In the beagle/beagled/Filter.cs there is a loop that instantiate each
FilterXX.cs present in the assembly, wouldn't it be better to also check
if the class we want to instantiate isn't an abstract one ?

Line 408:
if (t.IsSubclassOf (typeof (Filter)) && !t.IsAbstract) {
	Filter filter = (Filter) Activator.CreateInstance (t);

This fixes a problem whith my FilterMusic.cs abstract class that every
audio format extend.

Concerning the Playlist issue, I think playlists do not contain anything
useful, there are only a filename and a duration, and maybe a title, but
the title is also in the audio file...


Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]