I have a program that I am making for a friend and I don't want him to see the whole code, but I want him to be able to add classes that have attributes on the classes so he can add his own stuff to it, how would I be able to get classes using a compiled program and add them to the dictionary of methods to be called upon later?
Asked
Active
Viewed 133 times
0
-
1search for "C# plug-in" or "C# MEF" – Mitch Wheat Aug 28 '13 at 03:02
-
Couldn't you just compile the code and hand him the DLLs? – Khan Aug 28 '13 at 03:03
-
2Most realistic option is to write such bad code that noone want to look at it :). Otherwise Reflector/ILSpy (or any other IL disassembler) will show perfectly readable code... – Alexei Levenkov Aug 28 '13 at 03:10
-
Try to create a class library – Sumeshk Aug 28 '13 at 04:16
1 Answers
1
Use MEF.
The Managed Extensibility Framework or MEF is a library for creating lightweight, extensible applications. It allows application developers to discover and use extensions with no configuration required. It also lets extension developers easily encapsulate code and avoid fragile hard dependencies. MEF not only allows extensions to be reused within applications, but across applications as well.

Erwin
- 3,060
- 26
- 24