예제 #1
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);
        }
예제 #2
0
 private ActivityScheduledRecord(ActivityScheduledRecord record)
     : base(record)
 {
     this.Activity = record.Activity;
     this.Child    = record.Child;
 }