//It may not be necessary to create a recursive aggregator. public static LinkedList <LinkedList <SurlyTuple> > SurlyZip(LinkedList <SurlyAttributeSchema> schema, params object[] items) { ConsoleInterface.Set(ConsoleColor.Yellow); var test = schema.ToArray().Zip(items.ToArray(), (schemaItem, item) => { Console.WriteLine($"Pretending {item} is {schemaItem.Type}."); return(new SurlyAttribute { Value = item }); }); ConsoleInterface.Set(ConsoleColor.Cyan); return(null); }
public void ParseFile(string filePath) { try { using (var reader = new StreamReader(filePath)) { while (!reader.EndOfStream) { ParseLine(reader.ReadLine()); } } } catch (Exception ex) { ConsoleInterface.Set(ConsoleColor.Red); Console.WriteLine($"Error: {ex.Message}"); ConsoleInterface.Set(ConsoleColor.Cyan); } }