Previously I was using this call to load all cs file that extends from Rule class
var repository = new RuleRepository();
repository.Load(x => x.From(typeof(Rule1).Assembly));
By calling Load method as shown above all the class files of the same type as Rule1.cs (meaning all files extending from Rule class) get loaded into repository memory. Currently I have decided to convert all these .cs files (i.e. Rule1.cs) into dlls and scan the folder containing these dlls. How can I achieve this behavior? Currently I am doing something like this
Assembly assembly1 = Assembly.LoadFile(Server.MapPath("Rule1.dll"));
List<Assembly> asmblyList = new List<Assembly>();
asmblyList.Add(assembly1);
repository.Load(x => x.From(asmblyList));
I want to scan all the assemblies of type Rule1.dll from the folder. How can I possibly do it? Any help would be great.