Esempio n. 1
0
 private void AddActivityScheduledSubscription(ActivityScheduledQuery activityScheduledQuery)
 {
     _trackingRecordPreFilter.TrackActivityScheduledRecords = true;
     if (_activityScheduledSubscriptions == null)
     {
         _activityScheduledSubscriptions = new List <ActivityScheduledQuery>();
     }
     _activityScheduledSubscriptions.Add(activityScheduledQuery);
 }
Esempio n. 2
0
        private ActivityScheduledQuery Match(ActivityScheduledRecord activityScheduledRecord)
        {
            ActivityScheduledQuery query = null;

            if (_activityScheduledSubscriptions != null)
            {
                for (int i = 0; i < _activityScheduledSubscriptions.Count; i++)
                {
                    //check specific and then generic
                    string activityName = activityScheduledRecord.Activity == null ? null : activityScheduledRecord.Activity.Name;
                    if (string.CompareOrdinal(_activityScheduledSubscriptions[i].ActivityName, activityName) == 0)
                    {
                        if (CheckSubscription(_activityScheduledSubscriptions[i].ChildActivityName, activityScheduledRecord.Child.Name))
                        {
                            query = _activityScheduledSubscriptions[i];
                            break;
                        }
                    }
                    else if (string.CompareOrdinal(_activityScheduledSubscriptions[i].ActivityName, "*") == 0)
                    {
                        if (CheckSubscription(_activityScheduledSubscriptions[i].ChildActivityName, activityScheduledRecord.Child.Name))
                        {
                            query = _activityScheduledSubscriptions[i];
                            break;
                        }
                    }
                }
            }

            if ((query != null) && (_associatedProfile.ImplementationVisibility == ImplementationVisibility.RootScope))
            {
                if ((!ShouldTrackActivity(activityScheduledRecord.Activity, query.ActivityName)) ||
                    (!ShouldTrackActivity(activityScheduledRecord.Child, query.ChildActivityName)))
                {
                    return(null);
                }
            }

            return(query);
        }