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
- Extension Methods
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>
Source
public LaneNoteCollection<TNote, TLane> Source { get; }
Property Value
- LaneNoteCollection<TNote, TLane>
Methods
Get()
public TNote? Get()
Returns
- TNote?
GetUnsafe()
public ref readonly TNote GetUnsafe()
Returns
- TNote
Set(in TNote)
public void Set(in TNote note)
Parameters
noteTNote
Operators
implicit operator TNote?(in NoteProxy<TNote, TLane>)
public static implicit operator TNote?(in NoteProxy<TNote, TLane> proxy)
Parameters
proxyNoteProxy<TNote, TLane>
Returns
- TNote?