public Stack<IFoo> ProtocolStack; public interface IContext { } public interface IFoo { void Process(IContext bar); }; public void InjectCode(string assemblyLocation, string className) { System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFile(assemblyLocation); IFoo provider = (IFoo)assembly.CreateInstance(className); ProtocolStack.Push(provider); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)