public InterceptorWithHandler(ICanHandleInvocations handler)
 {
     AddHandler(handler);
 }
Example #2
0
 /// <summary>
 /// Add a handler for the given interface and a matching implementation
 /// that will act as the handler
 /// </summary>
 /// <typeparam name="TInterface">Interface to add for</typeparam>
 /// <typeparam name="TImplementation">Implementation that will actually handle invocations</typeparam>
 protected void AddHandler(ICanHandleInvocations invocationHandler)
 {
     _invocationHandlers.Add(invocationHandler);
 }
Example #3
0
 public InterceptorWithHandler(ICanHandleInvocations handler)
 {
     AddHandler(handler);
 }
Example #4
0
 /// <summary>
 /// Add a handler for the given interface and a matching implementation
 /// that will act as the handler
 /// </summary>
 /// <typeparam name="TInterface">Interface to add for</typeparam>
 /// <typeparam name="TImplementation">Implementation that will actually handle invocations</typeparam>
 protected void AddHandler(ICanHandleInvocations invocationHandler)
 {
     _invocationHandlers.Add(invocationHandler);
 }