public void PostProcess(IServiceRequestResult result)
{
if (!_filterPredicate(result))
return;
var container = result.Container;
var hasProxyFactory = container.Contains(typeof (IProxyFactory));
// Inject proxies only if a
// proxy factory instance is available
if (!hasProxyFactory)
return;
// Sealed types cannot be intercepted
var serviceType = result.ServiceType;
if (result.ActualResult != null && serviceType.IsSealed)
return;
// Replace the actual result with the proxy itself
result.ActualResult = _createProxy(result);
}