As a programmer, I write some code to practice wwf, and I have implemented the **call external activity** by using reflection.
1. Firstly, define a xml document that contain a plugin detail:
<xml version="1.0" encoding="utf-8" >
2.Secondly, call the external method by reflection in some codes:
Assembly assembly = Assembly.Load(assemblyName);
Type myInterface = assembly.GetType(interfaceName);
Type myClassType = null;
foreach (Type t in assembly.GetTypes())
if (myInterface.IsAssignableFrom(t) && t.IsClass)
myClassType = t;
MethodInfo methodInfo = myClassType.GetMethod(method);
object instance = Activator.CreateInstance(myClassType);
object result = methodInfo.Invoke(instance, userData);
But when I implement the handle external event pattern, i can't finish it by using reflection directly, then i want to hookup delegate, still faild. It seems that the mothod **addService(service)** do somethings inside the wf side. Could I still implement it
by use reflection?
Actualy, I don't know the detail about when the host client raise an event, how wf side can recieve this action. it seemed that this is the key for my question...
View Complete Post