private CustomTrackingQuery Match(CustomTrackingRecord customRecord)
        {
            CustomTrackingQuery query = null;

            if (_customTrackingQuerySubscriptions != null)
            {
                for (int i = 0; i < _customTrackingQuerySubscriptions.Count; i++)
                {
                    //check specific and then generic
                    if (string.CompareOrdinal(_customTrackingQuerySubscriptions[i].Name, customRecord.Name) == 0)
                    {
                        if (CheckSubscription(_customTrackingQuerySubscriptions[i].ActivityName, customRecord.Activity.Name))
                        {
                            query = _customTrackingQuerySubscriptions[i];
                            break;
                        }
                    }
                    else if (string.CompareOrdinal(_customTrackingQuerySubscriptions[i].Name, "*") == 0)
                    {
                        if (CheckSubscription(_customTrackingQuerySubscriptions[i].ActivityName, customRecord.Activity.Name))
                        {
                            query = _customTrackingQuerySubscriptions[i];
                            break;
                        }
                    }
                }
            }
            return(query);
        }
 private void AddCustomTrackingSubscription(CustomTrackingQuery customQuery)
 {
     if (_customTrackingQuerySubscriptions == null)
     {
         _customTrackingQuerySubscriptions = new List <CustomTrackingQuery>();
     }
     _customTrackingQuerySubscriptions.Add(customQuery);
 }