/// <summary> /// Remove the link to the next element. /// </summary> public void Unlink() { unsafe { _next = null; } }
/// <summary> /// Clear all links from the <see cref="Destinations"/>. /// </summary> public void ClearLinks() { ForEachDestination((destination, _) => destination[0].Unlink()); unsafe { _destinationsData = (SplitterDestination *)IntPtr.Zero; } }
/// <summary> /// Set the head of the linked list of <see cref="Destinations"/>. /// </summary> /// <param name="newValue">A reference to a <see cref="SplitterDestination"/>.</param> public void SetDestination(ref SplitterDestination newValue) { unsafe { fixed(SplitterDestination *newValuePtr = &newValue) { _destinationsData = newValuePtr; } } }
/// <summary> /// Link the next element to the given <see cref="SplitterDestination"/>. /// </summary> /// <param name="next">The given <see cref="SplitterDestination"/> to link.</param> public void Link(ref SplitterDestination next) { unsafe { fixed(SplitterDestination *nextPtr = &next) { _next = nextPtr; } } }