At the moment I have a list of classes like this:
public List<Algo> AlgoList = new List<Algo>
{
new BastionAlgo(),
new BitcoreAlgo(),
new Blake2SAlgo(),
new BlakeAlgo(),
new BlakeCoinAlgo(),
new BmwAlgo(),
new C11FlaxAlgo(),
new CryptolightAlgo(),
new CryptonightAlgo(),
...
};
As I add and remove classes I would prefer not to have to maintain a long list. Is there a way to find and instantiate all the classes that extend another in .net core 2?
Thank you in advance for you assistance.