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()
17
17
18
18
var notes = Midi . ReadMidiData ( content ) ;
19
19
20
- Assert . That ( notes . Count , Is . EqualTo ( 10 ) ) ;
20
+ Assert . That ( notes . Length , Is . EqualTo ( 10 ) ) ;
21
21
22
22
Assert . That ( notes [ 0 ] . Position , Is . EqualTo ( 0 ) ) ;
23
23
Assert . That ( notes [ 0 ] . HandPosition , Is . EqualTo ( 48 ) ) ;
@@ -58,7 +58,7 @@ public void TestReadMidiFile()
58
58
59
59
var notes = Midi . ReadMidiFile ( path ) ;
60
60
61
- Assert . That ( notes . Count , Is . EqualTo ( 10 ) ) ;
61
+ Assert . That ( notes . Length , Is . EqualTo ( 10 ) ) ;
62
62
63
63
Assert . That ( notes [ 0 ] . Position , Is . EqualTo ( 0 ) ) ;
64
64
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
19
19
public static class Midi
20
20
{
21
21
22
- public static List < Note > ReadMidiData ( byte [ ] bytes )
22
+ public static Note [ ] ReadMidiData ( byte [ ] bytes )
23
23
{
24
24
var notes = new List < Note > ( ) ;
25
25
@@ -37,10 +37,10 @@ public static List<Note> ReadMidiData(byte[] bytes)
37
37
38
38
Marshal . FreeHGlobal ( ptrArray ) ;
39
39
40
- return notes ;
40
+ return notes . ToArray ( ) ;
41
41
}
42
42
43
- public static List < Note > ReadMidiFile ( string path )
43
+ public static Note [ ] ReadMidiFile ( string path )
44
44
{
45
45
var notes = new List < Note > ( ) ;
46
46
@@ -58,7 +58,7 @@ public static List<Note> ReadMidiFile(string path)
58
58
59
59
Marshal . FreeHGlobal ( ptrArray ) ;
60
60
61
- return notes ;
61
+ return notes . ToArray ( ) ;
62
62
}
63
63
64
64
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public void TestReadMidiData()
17
17
18
18
var notes = Midi . ReadMidiData ( content ) ;
19
19
20
- Assert . That ( notes . Count , Is . EqualTo ( 10 ) ) ;
20
+ Assert . That ( notes . Length , Is . EqualTo ( 10 ) ) ;
21
21
22
22
Assert . That ( notes [ 0 ] . Position , Is . EqualTo ( 0 ) ) ;
23
23
Assert . That ( notes [ 0 ] . HandPosition , Is . EqualTo ( 48 ) ) ;
@@ -58,7 +58,7 @@ public void TestReadMidiFile()
58
58
59
59
var notes = Midi . ReadMidiFile ( path ) ;
60
60
61
- Assert . That ( notes . Count , Is . EqualTo ( 10 ) ) ;
61
+ Assert . That ( notes . Length , Is . EqualTo ( 10 ) ) ;
62
62
63
63
Assert . That ( notes [ 0 ] . Position , Is . EqualTo ( 0 ) ) ;
64
64
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
19
19
public static class Midi
20
20
{
21
21
22
- public static List < Note > ReadMidiData ( byte [ ] bytes )
22
+ public static Note [ ] ReadMidiData ( byte [ ] bytes )
23
23
{
24
24
var notes = new List < Note > ( ) ;
25
25
@@ -37,10 +37,10 @@ public static List<Note> ReadMidiData(byte[] bytes)
37
37
38
38
Marshal . FreeHGlobal ( ptrArray ) ;
39
39
40
- return notes ;
40
+ return notes . ToArray ( ) ;
41
41
}
42
42
43
- public static List < Note > ReadMidiFile ( string path )
43
+ public static Note [ ] ReadMidiFile ( string path )
44
44
{
45
45
var notes = new List < Note > ( ) ;
46
46
@@ -58,7 +58,7 @@ public static List<Note> ReadMidiFile(string path)
58
58
59
59
Marshal . FreeHGlobal ( ptrArray ) ;
60
60
61
- return notes ;
61
+ return notes . ToArray ( ) ;
62
62
}
63
63
64
64
}
You can’t perform that action at this time.
0 commit comments