コード例 #1
0
 private void AddFaultPropagationSubscription(FaultPropagationQuery faultQuery)
 {
     _trackingRecordPreFilter.TrackFaultPropagationRecords = true;
     if (_faultPropagationSubscriptions == null)
     {
         _faultPropagationSubscriptions = new List <FaultPropagationQuery>();
     }
     _faultPropagationSubscriptions.Add(faultQuery);
 }
コード例 #2
0
        private FaultPropagationQuery Match(FaultPropagationRecord faultRecord)
        {
            FaultPropagationQuery query = null;

            if (_faultPropagationSubscriptions != null)
            {
                for (int i = 0; i < _faultPropagationSubscriptions.Count; i++)
                {
                    //check specific and then generic
                    string faultHandlerName = faultRecord.FaultHandler == null ? null : faultRecord.FaultHandler.Name;
                    if (string.CompareOrdinal(_faultPropagationSubscriptions[i].FaultSourceActivityName, faultRecord.FaultSource.Name) == 0)
                    {
                        if (CheckSubscription(_faultPropagationSubscriptions[i].FaultHandlerActivityName, faultHandlerName))
                        {
                            query = _faultPropagationSubscriptions[i];
                            break;
                        }
                    }
                    else if (string.CompareOrdinal(_faultPropagationSubscriptions[i].FaultSourceActivityName, "*") == 0)
                    {
                        if (CheckSubscription(_faultPropagationSubscriptions[i].FaultHandlerActivityName, faultHandlerName))
                        {
                            query = _faultPropagationSubscriptions[i];
                            break;
                        }
                    }
                }
            }

            if ((query != null) && (_associatedProfile.ImplementationVisibility == ImplementationVisibility.RootScope))
            {
                if ((!ShouldTrackActivity(faultRecord.FaultHandler, query.FaultHandlerActivityName)) ||
                    (!ShouldTrackActivity(faultRecord.FaultSource, query.FaultSourceActivityName)))
                {
                    return(null);
                }
            }

            return(query);
        }