private static void WriteHeader(ExtractHouseholdData root, StreamWriter writer) { writer.Write("PD,"); for (int i = 0; i < root.AgeSets.Count; i++) { writer.Write(root.AgeSets[i].ToString()); writer.Write(','); } writer.WriteLine("Vehicles,ExpansionFactor"); }
internal void Save(ExtractHouseholdData root) { using (StreamWriter writer = new StreamWriter(root.SaveFile.GetFileName())) { WriteHeader(root, writer); for (int i = 0; i < this.EntryList.Count; i++) { var entry = this.EntryList[i]; writer.Write(entry.PlanningDistrict); writer.Write(','); for (int j = 0; j < entry.AgeCategoryCount.Length; j++) { writer.Write(entry.AgeCategoryCount[j]); writer.Write(','); } writer.Write(entry.NumberOfCars); writer.Write(','); writer.WriteLine(entry.ExpandedTotal); } } }
private static void WriteHeader(ExtractHouseholdData root, StreamWriter writer) { writer.Write( "PD," ); for ( int i = 0; i < root.AgeSets.Count; i++ ) { writer.Write( root.AgeSets[i].ToString() ); writer.Write( ',' ); } writer.WriteLine( "Vehicles,ExpansionFactor" ); }
internal void Save(ExtractHouseholdData root) { using ( StreamWriter writer = new StreamWriter( root.SaveFile.GetFileName() ) ) { WriteHeader( root, writer ); for ( int i = 0; i < this.EntryList.Count; i++ ) { var entry = this.EntryList[i]; writer.Write( entry.PlanningDistrict ); writer.Write( ',' ); for ( int j = 0; j < entry.AgeCategoryCount.Length; j++ ) { writer.Write( entry.AgeCategoryCount[j] ); writer.Write( ',' ); } writer.Write( entry.NumberOfCars ); writer.Write( ',' ); writer.WriteLine( entry.ExpandedTotal ); } } }