private EPWFile defineFormat() { EPWFile epw = new EPWFile(); StreamReader sr = new StreamReader(@"C:\Users\Admin\Documents\projects\IAPP\piloto\Climate\ClimateDataETL\epwFormat.txt"); string line = sr.ReadLine(); EPWGroup g = new EPWGroup(); EPWField f = new EPWField(); while (line != null) { var parts = line.Split(','); if (parts.Length == 1) { g = new EPWGroup(); g.name = parts[0]; epw.groups.Add(g); } else { if (parts[0].Contains("A") || parts[0].Contains("N")) { f = new EPWField(); f.name = parts[0]; g.fields.Add(f); f.keyValues.Add(new KeyValuePair <string, string>(parts[1], parts[2])); } else { f.keyValues.Add(new KeyValuePair <string, string>(parts[0], parts[1])); } } line = sr.ReadLine(); } sr.Close(); return(epw); }
public EPWFile(EPWFile other) { groups = new List <EPWGroup>(other.groups); }
public EPWsummary() { epwFormat = defineFormat(); printFormat(); }