View Complete Post
I'm developing an application that needs to be very easily maintained. Currently, the program calls a boolean function, which determines if a given set of criteria are met, and then if true... increments a counter. Afterwards, it moves on to the next function, until all 9 funcitons have been called and the counter now set anywhere between 0-8.
I would like to put each function in a class file, within a subfolder. IE: Main Application -> Service1.asmx -> DataCriteria (folder) -> OverLimit, UnitExpired, AddressUnavailable, etc. etc. etc.
Then, have a method (using reflection or whatever means possible) that will loop through each .vb (class) file in the DataCriteria folder, and run its Main function to get the boolean. This would mean that the calling application does not care how many classes exist in that folder, it checks each class. And if new criteria needs to be added, i just create a new class and plop it into that folder, without having to edit any code files.
Of course, each class within the DataCriteria folder would need to implement an interface, to verify that they each have the same method type...
any ideas / suggestions?
Hi, i often write a class derived from built in .NET class.
Unfortunately, there are many methods/properties/fields that marked private/internal (i decompile using net reflector),so i call the members using reflection (get method/field/property, invoke method).
The reflection is damn slow!
Anyone knows how to solve my problem? Or have alternate method instead of using reflection?
*** the sealed, internal, and private keywords is enemy for me, it prevents the developer for derivering a class/type.