public void setCookiesMatcher(CookiesMatcher cookiesMatcher) { this.cookiesMatcher = cookiesMatcher; }
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); }
public UnlockableSystem(Logger logger) { this.cookiesMatcher = new DefaultCookiesMatcher(); this.logger = logger; }