public IntegrationConfigModel GetMatchedIntegrationConfig(CustomerIntegration customerIntegration,
                                                           string currentPageUrl, HttpCookieCollection cookieCollection)
 {
     foreach (var integration in customerIntegration.Integrations)
     {
         foreach (var trigger in integration.Triggers)
         {
             if (EvaluateTrigger(trigger, currentPageUrl, cookieCollection))
             {
                 return(integration);
             }
         }
     }
     return(null);
 }
Esempio n. 2
0
        public IntegrationConfigModel GetMatchedIntegrationConfig(CustomerIntegration customerIntegration, string currentPageUrl, HttpRequestBase request)
        {
            if (request == null)
            {
                throw new ArgumentException("request is null");
            }

            foreach (var integration in customerIntegration.Integrations)
            {
                foreach (var trigger in integration.Triggers)
                {
                    if (EvaluateTrigger(trigger, currentPageUrl, request))
                    {
                        return(integration);
                    }
                }
            }
            return(null);
        }