// Get the Matches and return the top rank. public string Match(ListProducts LP) { string result = null; List<string> FM = new List<string>(); FindMatches(LP.Head, ref FM); if (FM.Count > 1) result=Ranking_Function(FM); return result; }
public static ListProducts GetProducts(string path, JavaScriptSerializer J) { ListProducts L = new ListProducts(); // We deserialize each line into a Product object. // This Product object is added to the ListProducts L. StreamReader S = new StreamReader(path); string line; while ((line = S.ReadLine()) != null) { L.Add(J.Deserialize<Product>(line)); } S.Close(); return L; }