Note. The entire sample code is greatly simplified.
I have a DLL defined as:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Web; namespace RIV.Module { public interface IModule { StringWriter ProcessRequest(HttpContext context); string Decrypt(string interactive); string ExecutePlayerAction(object ParamObjectFromFlash); void LogEvent(object LoggingObjectFromFlash); } }
Now, outside my solution, other developers can define specific classes and transfer them to the BIN folder of my application. Maybe something like:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using RIV.Module; namespace RIV.Module.Greeting { public class Module : IModule { public System.IO.StringWriter ProcessRequest(System.Web.HttpContext context) {
Now, in my application, I would need to know that a new module is available (I guess through web.config or something like that), and then you can call it based on some kind of trigger in the Database Campaign table (which maps to the module that will be used for this particular campaign).
I am trying to create it this way:
var type = typeof(RIV.Module.Greeting.Module); var obj = (RIV.Module.Greeting.Module)Activator.CreateInstance(type);
However, the compiler spews because the link was never installed on RIV.Module.Greeting.dll !
What am I doing wrong?
source share