public void InterceptResponse(ref Messages.InterDomainMessageResponse response) { RoutedInterDomainMessage ridm = (RoutedInterDomainMessage)response.Message; lock (_postRequestors) { foreach (sRoute srt in ridm.PostInterceptRoutes) { if (_postRequestors.ContainsKey(srt)) { foreach (IInterDomainMessagePostRequestInterceptor idmpri in _postRequestors[srt]) { if (!response.HasIntercepted(idmpri.GetType())) { object tmp; idmpri.InterceptResponse(response, out tmp); if (tmp != null) { response = Messages.InterDomainMessageResponse.SwapResponse(response, tmp); response.MarkInterceptor(idmpri.GetType()); } } } } } } }
public bool InterceptsResponse(Messages.InterDomainMessageResponse response) { bool ret = false; RoutedInterDomainMessage ridm = (RoutedInterDomainMessage)response.Message; lock (_postRequestors) { foreach (sRoute srt in ridm.PostInterceptRoutes) { if (_postRequestors.ContainsKey(srt)) { ret = true; break; } } } return(ret); }