code_junkie

Best way to build a hot pluggable WCF service library

Nov 13th, 2011
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. Assembly a = GetAssembly();
  2. Type t = ExportModule.GetExportType(a);
  3. if (t == null) throw new Exception("No proper type found.");
  4.  
  5. object iExportModule = Activator.CreateInstance(t);
  6. object[] arguments = new object[] { _export.ConnectionString, GetFileName() };
  7.  
  8. t.InvokeMember("ExecuteExport", BindingFlags.Default | BindingFlags.InvokeMethod,
  9. null, iExportModule, arguments);
Add Comment
Please, Sign In to add comment