Esempio n. 1
0
 public void setCookiesMatcher(CookiesMatcher cookiesMatcher)
 {
     this.cookiesMatcher = cookiesMatcher;
 }
Esempio n. 2
0
        public List <Property> findPropertiesByMetricId(int metricId, object[] cookies, CookiesMatcher cookiesMatcher)
        {
            List <Property> foundProperties = new List <Property>();
            Metric          m = getMetricById(metricId);

            int[] relatedProperties = m.getProperties();

            for (int i = 0; i < relatedProperties.Length; i++)
            {
                int propertyId = relatedProperties[i];
                if (!properties.ContainsKey(propertyId))
                {
                    if (logger != null)
                    {
                        logger.info(string.Format("No property found for metric id '{0}' cookies '{1}'", metricId,
                                                  cookies.ToString()));
                    }
                    continue;
                }
                object[] propertyCookies = getPropertyById(propertyId).getCookies();
                if (cookiesMatcher.Match(propertyId, propertyCookies, metricId, cookies))
                {
                    foundProperties.Add(properties[propertyId]);
                }
            }
            return(foundProperties);
        }
Esempio n. 3
0
 public UnlockableSystem(Logger logger)
 {
     this.cookiesMatcher = new DefaultCookiesMatcher();
     this.logger         = logger;
 }