1616// along with Open Rails. If not, see <http://www.gnu.org/licenses/>.
1717
1818// This code processes the Timetable definition and converts it into playable train information
19- //
2019
2120using System ;
2221using System . Collections . Generic ;
@@ -32,7 +31,6 @@ namespace Orts.Simulation.Timetables
3231 /// </summary>
3332 public class TurntableInfo : PoolInfo
3433 {
35-
3634 //================================================================================================//
3735 /// <summary>
3836 /// Constructor
@@ -42,7 +40,6 @@ public TurntableInfo(Simulator simulatorref) : base(simulatorref)
4240 {
4341 }
4442
45-
4643 //================================================================================================//
4744 /// <summary>
4845 /// Read pool files
@@ -55,33 +52,33 @@ public Dictionary<string, TimetableTurntablePool> ProcessTurntables(string[] arg
5552 Dictionary < string , TimetableTurntablePool > turntables = new Dictionary < string , TimetableTurntablePool > ( ) ;
5653 List < string > filenames ;
5754
58- // get filenames to process
55+ // Get filenames to process
5956 filenames = GetTurntableFilenames ( arguments [ 0 ] ) ;
6057
61- // get file contents as strings
58+ // Get file contents as strings
6259 Trace . Write ( "\n " ) ;
6360 foreach ( string filePath in filenames )
6461 {
65- // get contents as strings
62+ // Get contents as strings
6663 Trace . Write ( "Turntable File : " + filePath + "\n " ) ;
6764 var turntableInfo = new TimetableReader ( filePath ) ;
6865
69- // read lines from input until 'Name' definition is found
66+ // Read lines from input until 'Name' definition is found
7067 int lineindex = 1 ;
7168 while ( lineindex < turntableInfo . Strings . Count )
7269 {
7370 switch ( turntableInfo . Strings [ lineindex ] [ 0 ] . ToLower ( ) . Trim ( ) )
7471 {
75- // skip comment
72+ // Skip comment
7673 case "#comment" :
7774 lineindex ++ ;
7875 break ;
7976
80- // process name
81- // do not increase lineindex as that is done in called method
77+ // Process name
78+ // Do not increase lineindex as that is done in called method
8279 case "#name" :
8380 TimetableTurntablePool newTurntable = new TimetableTurntablePool ( turntableInfo , ref lineindex , simulator ) ;
84- // store if valid pool
81+ // Store if valid pool
8582 if ( ! String . IsNullOrEmpty ( newTurntable . PoolName ) )
8683 {
8784 if ( turntables . ContainsKey ( newTurntable . PoolName ) )
@@ -107,7 +104,7 @@ public Dictionary<string, TimetableTurntablePool> ProcessTurntables(string[] arg
107104 }
108105 }
109106
110- return ( turntables ) ;
107+ return turntables ;
111108 }
112109
113110
@@ -121,7 +118,7 @@ private List<string> GetTurntableFilenames(string filePath)
121118 {
122119 List < string > filenames = new List < string > ( ) ;
123120
124- // check type of timetable file - list or single
121+ // Check type of timetable file - list or single
125122 string fileDirectory = Path . GetDirectoryName ( filePath ) ;
126123
127124 foreach ( var ORTurntableFile in Directory . GetFiles ( fileDirectory , "*.turntable_or" ) )
@@ -133,7 +130,7 @@ private List<string> GetTurntableFilenames(string filePath)
133130 filenames . Add ( ORTunrtableFile ) ;
134131 }
135132
136- return ( filenames ) ;
133+ return filenames ;
137134 }
138135 }
139136}
0 commit comments