@@ -165,7 +165,6 @@ public static string MangleMethodClass(AmqpClass c, AmqpMethod m) {
165
165
public XmlDocument m_spec = null ;
166
166
public TextWriter m_outputFile = null ;
167
167
168
- public bool m_versionOverridden = false ;
169
168
public int m_majorVersion ;
170
169
public int m_minorVersion ;
171
170
public int m_revision = 0 ;
@@ -209,11 +208,6 @@ public void HandleOption(string opt) {
209
208
m_framingSubnamespace = opt . Substring ( 3 ) ;
210
209
} else if ( opt . StartsWith ( "/apiName:" ) ) {
211
210
m_apiName = opt . Substring ( 9 ) ;
212
- } else if ( opt . StartsWith ( "/v:" ) ) {
213
- string [ ] parts = opt . Substring ( 3 ) . Split ( new char [ ] { '-' } ) ;
214
- m_versionOverridden = true ;
215
- m_majorVersion = int . Parse ( parts [ 0 ] ) ;
216
- m_minorVersion = int . Parse ( parts [ 1 ] ) ;
217
211
} else if ( opt == "/c" ) {
218
212
m_emitComments = true ;
219
213
} else {
@@ -227,7 +221,6 @@ public void Usage() {
227
221
Console . Error . WriteLine ( " Options include:" ) ;
228
222
Console . Error . WriteLine ( " /apiName:<identifier>" ) ;
229
223
Console . Error . WriteLine ( " /n:<name.space.prefix>" ) ;
230
- Console . Error . WriteLine ( " /v:<majorversion>-<minorversion>" ) ;
231
224
Console . Error . WriteLine ( " The apiName option is required." ) ;
232
225
Environment . Exit ( 1 ) ;
233
226
}
@@ -285,15 +278,11 @@ public void LoadSpec() {
285
278
}
286
279
287
280
public void ParseSpec ( ) {
288
- Console . WriteLine ( "* Parsing spec" ) ;
289
- if ( ! m_versionOverridden ) {
290
- m_majorVersion = GetInt ( m_spec , "/amqp/@major" ) ;
291
- m_minorVersion = GetInt ( m_spec , "/amqp/@minor" ) ;
292
- if ( m_spec . SelectSingleNode ( "/amqp/@revision" ) != null )
293
- {
294
- m_revision = GetInt ( m_spec , "/amqp/@revision" ) ;
295
- }
296
- }
281
+ m_majorVersion = GetInt ( m_spec , "/amqp/@major" ) ;
282
+ m_minorVersion = GetInt ( m_spec , "/amqp/@minor" ) ;
283
+ m_revision = GetInt ( m_spec , "/amqp/@revision" ) ;
284
+
285
+ Console . WriteLine ( "* Parsing spec for version {0}.{1}.{2}" , m_majorVersion , m_minorVersion , m_revision ) ;
297
286
foreach ( XmlNode n in m_spec . SelectNodes ( "/amqp/constant" ) ) {
298
287
m_constants . Add ( new KeyValuePair < string , int > ( GetString ( n , "@name" ) , GetInt ( n , "@value" ) ) ) ;
299
288
}
0 commit comments