@@ -268,15 +268,17 @@ public void Merge(Track trk)
268268
269269 #region Ensure
270270
271+ #if ( DEBUG )
271272 Debug . Assert ( count == oldCount + trk . Count - 1 ) ;
273+ #endif
272274
273- #endregion
275+ #endregion
274276
275- #region Invariant
277+ #region Invariant
276278
277279 AssertValid ( ) ;
278280
279- #endregion
281+ #endregion
280282 }
281283
282284 /// <summary>
@@ -287,7 +289,7 @@ public void Merge(Track trk)
287289 /// </param>
288290 public void RemoveAt ( int index )
289291 {
290- #region Require
292+ #region Require
291293
292294 if ( index < 0 )
293295 {
@@ -298,7 +300,7 @@ public void RemoveAt(int index)
298300 throw new ArgumentException ( "Cannot remove the end of track event." , "index" ) ;
299301 }
300302
301- #endregion
303+ #endregion
302304
303305 MidiEvent current = GetMidiEvent ( index ) ;
304306
@@ -331,11 +333,11 @@ public void RemoveAt(int index)
331333
332334 count -- ;
333335
334- #region Invariant
336+ #region Invariant
335337
336338 AssertValid ( ) ;
337339
338- #endregion
340+ #endregion
339341 }
340342
341343 /// <summary>
@@ -349,15 +351,15 @@ public void RemoveAt(int index)
349351 /// </returns>
350352 public MidiEvent GetMidiEvent ( int index )
351353 {
352- #region Require
354+ #region Require
353355
354356 if ( index < 0 || index >= Count )
355357 {
356358 throw new ArgumentOutOfRangeException ( "index" , index ,
357359 "Track index out of range." ) ;
358360 }
359361
360- #endregion
362+ #endregion
361363
362364 MidiEvent result ;
363365
@@ -387,9 +389,9 @@ public MidiEvent GetMidiEvent(int index)
387389 }
388390 }
389391
390- #region Ensure
392+ #region Ensure
391393
392- #if( DEBUG )
394+ #if ( DEBUG )
393395 if ( index == Count - 1 )
394396 {
395397 Debug . Assert ( result . AbsoluteTicks == Length ) ;
@@ -408,14 +410,14 @@ public MidiEvent GetMidiEvent(int index)
408410 }
409411#endif
410412
411- #endregion
413+ #endregion
412414
413415 return result ;
414416 }
415417
416418 public void Move ( MidiEvent e , int newPosition )
417419 {
418- #region Require
420+ #region Require
419421
420422 if ( e . Owner != this )
421423 {
@@ -431,7 +433,7 @@ public void Move(MidiEvent e, int newPosition)
431433 "Cannot move end of track message. Use the EndOfTrackOffset property instead." ) ;
432434 }
433435
434- #endregion
436+ #endregion
435437
436438 MidiEvent previous = e . Previous ;
437439 MidiEvent next = e . Next ;
@@ -494,11 +496,11 @@ public void Move(MidiEvent e, int newPosition)
494496 endOfTrackMidiEvent . SetAbsoluteTicks ( Length ) ;
495497 endOfTrackMidiEvent . Previous = tail ;
496498
497- #region Invariant
499+ #region Invariant
498500
499501 AssertValid ( ) ;
500502
501- #endregion
503+ #endregion
502504 }
503505
504506 [ Conditional ( "DEBUG" ) ]
@@ -534,9 +536,9 @@ private void AssertValid()
534536 Debug . Assert ( c == Count , "Count mismatch" ) ;
535537 }
536538
537- #endregion
539+ #endregion
538540
539- #region Properties
541+ #region Properties
540542
541543 /// <summary>
542544 /// Gets the number of MidiEvents in the Track.
@@ -578,15 +580,15 @@ public int EndOfTrackOffset
578580 }
579581 set
580582 {
581- #region Require
583+ #region Require
582584
583585 if ( value < 0 )
584586 {
585587 throw new ArgumentOutOfRangeException ( "EndOfTrackOffset" , value ,
586588 "End of track offset out of range." ) ;
587589 }
588590
589- #endregion
591+ #endregion
590592
591593 endOfTrackOffset = value ;
592594
@@ -605,8 +607,8 @@ public object SyncRoot
605607 }
606608 }
607609
608- #endregion
610+ #endregion
609611
610- #endregion
612+ #endregion
611613 }
612614}
0 commit comments