@@ -22,7 +22,7 @@ private abstract class NoteOnsHolderBase<TDescriptor> where TDescriptor : IObjec
2222 private readonly Stack < LinkedListNode < TDescriptor > > _nodesStack ;
2323 private readonly Queue < LinkedListNode < TDescriptor > > _nodesQueue ;
2424
25- public NoteOnsHolderBase ( NoteStartDetectionPolicy noteStartDetectionPolicy )
25+ protected NoteOnsHolderBase ( NoteStartDetectionPolicy noteStartDetectionPolicy )
2626 {
2727 switch ( noteStartDetectionPolicy )
2828 {
@@ -110,13 +110,13 @@ private interface IObjectDescriptorIndexed : IObjectDescriptor
110110
111111 private class NoteDescriptor : IObjectDescriptor
112112 {
113+ private TimedEvent _noteOnTimedEvent ;
114+
113115 public NoteDescriptor ( TimedEvent noteOnTimedEvent )
114116 {
115- NoteOnTimedEvent = noteOnTimedEvent ;
117+ _noteOnTimedEvent = noteOnTimedEvent ;
116118 }
117119
118- public TimedEvent NoteOnTimedEvent { get ; }
119-
120120 public TimedEvent NoteOffTimedEvent { get ; set ; }
121121
122122 public bool IsCompleted => NoteOffTimedEvent != null ;
@@ -125,9 +125,9 @@ public ITimedObject GetObject(Func<NoteData, Note> constructor)
125125 {
126126 return IsCompleted
127127 ? ( constructor == null
128- ? new Note ( NoteOnTimedEvent , NoteOffTimedEvent , false )
129- : constructor ( new NoteData ( NoteOnTimedEvent , NoteOffTimedEvent ) ) )
130- : ( ITimedObject ) NoteOnTimedEvent ;
128+ ? new Note ( _noteOnTimedEvent , NoteOffTimedEvent , false )
129+ : constructor ( new NoteData ( _noteOnTimedEvent , NoteOffTimedEvent ) ) )
130+ : ( ITimedObject ) _noteOnTimedEvent ;
131131 }
132132 }
133133
@@ -166,18 +166,18 @@ public TimedObjectAt<ITimedObject> GetIndexedObject(Func<NoteData, Note> constru
166166
167167 private class TimedEventDescriptor : IObjectDescriptor
168168 {
169+ private TimedEvent _timedEvent ;
170+
169171 public TimedEventDescriptor ( TimedEvent timedEvent )
170172 {
171- TimedEvent = timedEvent ;
173+ _timedEvent = timedEvent ;
172174 }
173175
174- public TimedEvent TimedEvent { get ; }
175-
176176 public bool IsCompleted { get ; } = true ;
177177
178178 public ITimedObject GetObject ( Func < NoteData , Note > constructor )
179179 {
180- return TimedEvent ;
180+ return _timedEvent ;
181181 }
182182 }
183183
0 commit comments