Struct NoteProxy<TNote, TLane>
- Namespace
- ChartTools
- Assembly
- ChartTools.dll
Provides a proxy for accessing and modifying a note within a specific lane in a lane note collection.
public readonly struct NoteProxy<TNote, TLane> where TNote : struct, IDefinedLaneNote<TLane> where TLane : struct, Enum
Type Parameters
TNoteThe value type representing a note associated with a lane. Must implement ILaneNote<TLane>.
TLaneThe enumeration type that identifies lanes within the collection.
- Inherited Members
Remarks
Use NoteProxy<TNote, TLane> to interact with a note in a specific lane without directly accessing the underlying collection. This can simplify code that needs to read or update notes for a particular lane.
Constructors
NoteProxy(TLane, LaneNoteCollection<TNote, TLane>)
public NoteProxy(TLane lane, LaneNoteCollection<TNote, TLane> source)
Parameters
laneTLanesourceLaneNoteCollection<TNote, TLane>
Properties
Lane
public SafeEnum<TLane> Lane { get; }
Property Value
- SafeEnum<TLane>
LaneIndex
public byte LaneIndex { get; }
Property Value
Source
public LaneNoteCollection<TNote, TLane> Source { get; }
Property Value
- LaneNoteCollection<TNote, TLane>
Methods
AddOrSet(uint)
public void AddOrSet(uint sustain = 0)
Parameters
sustainuint
AddOrSet(in TNote)
public void AddOrSet(in TNote note)
Parameters
noteTNote
Get()
public TNote? Get()
Returns
- TNote?
GetUnsafe()
public ref readonly TNote GetUnsafe()
Returns
- TNote
Operators
implicit operator NoteProxy(in NoteProxy<TNote, TLane>)
public static implicit operator NoteProxy(in NoteProxy<TNote, TLane> proxy)
Parameters
proxyNoteProxy<TNote, TLane>
Returns
implicit operator TNote?(in NoteProxy<TNote, TLane>)
public static implicit operator TNote?(in NoteProxy<TNote, TLane> proxy)
Parameters
proxyNoteProxy<TNote, TLane>
Returns
- TNote?