private static void Output(IWrapper wrapper, IMatchResult results) { Console.WriteLine(wrapper.GetType().Name); foreach (var item in wrapper.AvailableProperties) { Console.WriteLine("{0} -> {1}", item, results.getValue(item)); } }
/// <summary> /// Computes a hash based on values of the 51Degrees properties that /// were passed as part of the Match object. Only property values are /// used to compute hash. /// </summary> /// <param name="match"> /// Object containing 51Degrees device detection results. /// </param> /// <returns> /// Hash value of the provided Match object. /// </returns> public static long getHash(IMatchResult match) { long hash = 0L; foreach (var property in provider.AvailableProperties) { hash += match.getValue(property).GetHashCode(); } return(hash); }