File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed
RhythmGameUtilities.Tests
RhythmGameUtilities/Scripts Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public void TestReadMidiData()
1717
1818 var notes = Midi . ReadMidiData ( content ) ;
1919
20- Assert . That ( notes . Count , Is . EqualTo ( 10 ) ) ;
20+ Assert . That ( notes . Length , Is . EqualTo ( 10 ) ) ;
2121
2222 Assert . That ( notes [ 0 ] . Position , Is . EqualTo ( 0 ) ) ;
2323 Assert . That ( notes [ 0 ] . HandPosition , Is . EqualTo ( 48 ) ) ;
@@ -58,7 +58,7 @@ public void TestReadMidiFile()
5858
5959 var notes = Midi . ReadMidiFile ( path ) ;
6060
61- Assert . That ( notes . Count , Is . EqualTo ( 10 ) ) ;
61+ Assert . That ( notes . Length , Is . EqualTo ( 10 ) ) ;
6262
6363 Assert . That ( notes [ 0 ] . Position , Is . EqualTo ( 0 ) ) ;
6464 Assert . That ( notes [ 0 ] . HandPosition , Is . EqualTo ( 48 ) ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ internal static class MidiInternal
1919 public static class Midi
2020 {
2121
22- public static List < Note > ReadMidiData ( byte [ ] bytes )
22+ public static Note [ ] ReadMidiData ( byte [ ] bytes )
2323 {
2424 var notes = new List < Note > ( ) ;
2525
@@ -37,10 +37,10 @@ public static List<Note> ReadMidiData(byte[] bytes)
3737
3838 Marshal . FreeHGlobal ( ptrArray ) ;
3939
40- return notes ;
40+ return notes . ToArray ( ) ;
4141 }
4242
43- public static List < Note > ReadMidiFile ( string path )
43+ public static Note [ ] ReadMidiFile ( string path )
4444 {
4545 var notes = new List < Note > ( ) ;
4646
@@ -58,7 +58,7 @@ public static List<Note> ReadMidiFile(string path)
5858
5959 Marshal . FreeHGlobal ( ptrArray ) ;
6060
61- return notes ;
61+ return notes . ToArray ( ) ;
6262 }
6363
6464 }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public void TestReadMidiData()
1717
1818 var notes = Midi . ReadMidiData ( content ) ;
1919
20- Assert . That ( notes . Count , Is . EqualTo ( 10 ) ) ;
20+ Assert . That ( notes . Length , Is . EqualTo ( 10 ) ) ;
2121
2222 Assert . That ( notes [ 0 ] . Position , Is . EqualTo ( 0 ) ) ;
2323 Assert . That ( notes [ 0 ] . HandPosition , Is . EqualTo ( 48 ) ) ;
@@ -58,7 +58,7 @@ public void TestReadMidiFile()
5858
5959 var notes = Midi . ReadMidiFile ( path ) ;
6060
61- Assert . That ( notes . Count , Is . EqualTo ( 10 ) ) ;
61+ Assert . That ( notes . Length , Is . EqualTo ( 10 ) ) ;
6262
6363 Assert . That ( notes [ 0 ] . Position , Is . EqualTo ( 0 ) ) ;
6464 Assert . That ( notes [ 0 ] . HandPosition , Is . EqualTo ( 48 ) ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ internal static class MidiInternal
1919 public static class Midi
2020 {
2121
22- public static List < Note > ReadMidiData ( byte [ ] bytes )
22+ public static Note [ ] ReadMidiData ( byte [ ] bytes )
2323 {
2424 var notes = new List < Note > ( ) ;
2525
@@ -37,10 +37,10 @@ public static List<Note> ReadMidiData(byte[] bytes)
3737
3838 Marshal . FreeHGlobal ( ptrArray ) ;
3939
40- return notes ;
40+ return notes . ToArray ( ) ;
4141 }
4242
43- public static List < Note > ReadMidiFile ( string path )
43+ public static Note [ ] ReadMidiFile ( string path )
4444 {
4545 var notes = new List < Note > ( ) ;
4646
@@ -58,7 +58,7 @@ public static List<Note> ReadMidiFile(string path)
5858
5959 Marshal . FreeHGlobal ( ptrArray ) ;
6060
61- return notes ;
61+ return notes . ToArray ( ) ;
6262 }
6363
6464 }
You can’t perform that action at this time.
0 commit comments