public void Main() { var host = new Host(); var mp = new SimplePlugin(); var pf = new ProxyFactory(mp); pf.AddAdvice(new DelegateToHostExceptionHandlingAdvice(host)); var proxy = (IPlugin)pf.GetProxy(); proxy.DoWork(); }
public DelegateToHostExceptionHandlingAdvice(Host host) { _host = host; }