I have a software in c# that exposes an interface for plugins. The plugins come with the ability to interact with a factory that creates certain tools for use in the plugin, however I do not want to distribute the code for the factory compiled along with the assembly for the plugin interface. The problem is that the factory is not an interface, its a static factory interior to the system. How do I expose what the factory does, without exposing what the factory is, so to speak.
Thank you for your help.
Since the factory is a dependency of any plugins, you cannot obfuscate/encrypt it – plugins would not be able to use the factory if you did. You won’t have to distribute the C# source to your factory, but you will have to include the compiled assembly with the factory, or the plugins will not work. So the short answer is “You can’t”.