SvgListBase<T> Class

The list interfaces of SVG (https://svgwg.org/svg2-draft/types.html#ListInterfaces).

public abstract class SvgListBase<T> : IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, IEnumerable where T : notnull
Implements

Properties

NameDescription
CountGets the number of items of the list.
LengthGets the number of items of the list.
NumberOfItemsGets the number of items of the list.

Gets the number of items of the list.

public int Count { get; }

Property value

int

Gets the number of items of the list.

public uint Length { get; }

NumberOfItems

SvgLists.cs

Gets the number of items of the list.

public uint NumberOfItems { get; }

Indexers

NameDescription
this[int]Gets the item at the given index.
this[uint]Gets or sets the item at the given index; setting an item replaces the existing one.

Item overloads

this[int]

SvgLists.cs

Gets the item at the given index.

public T this[int index] { get; }
Parameters
index int
Property value

T

this[uint]

SvgLists.cs

Gets or sets the item at the given index; setting an item replaces the existing one.

public T this[uint index] { get; set; }

Methods

NameDescription
AppendItem(T)Appends the item to the list and returns it.
Clear()Removes all the items of the list.
GetEnumerator()Returns an enumerator that iterates through the collection.
GetItem(uint)Returns the item at the given index, or throws an IndexSizeError when the index is out of range.
Initialize(T)Clears the list, then inserts the given item as its only item and returns it.
InsertItemBefore(T, uint)Inserts the item before the item at the given index (at the end if the index is too large) and returns it.
RemoveItem(uint)Removes the item at the given index from the list and returns it.
ReplaceItem(T, uint)Replaces the item at the given index with the given item and returns the new item.
System.Collections.IEnumerable.GetEnumerator()

AppendItem(T)

SvgLists.cs

Appends the item to the list and returns it.

public T AppendItem(T newItem)

Removes all the items of the list.

public void Clear()

GetEnumerator()

SvgLists.cs

Returns an enumerator that iterates through the collection.

public IEnumerator<T> GetEnumerator()

Returns

IEnumerator<T> An enumerator that can be used to iterate through the collection.

GetItem(uint)

SvgLists.cs

Returns the item at the given index, or throws an IndexSizeError when the index is out of range.

public T GetItem(uint index)

Initialize(T)

SvgLists.cs

Clears the list, then inserts the given item as its only item and returns it.

public T Initialize(T newItem)

InsertItemBefore(T, uint)

SvgLists.cs

Inserts the item before the item at the given index (at the end if the index is too large) and returns it.

public T InsertItemBefore(T newItem, uint index)

RemoveItem(uint)

SvgLists.cs

Removes the item at the given index from the list and returns it.

public T RemoveItem(uint index)

ReplaceItem(T, uint)

SvgLists.cs

Replaces the item at the given index with the given item and returns the new item.

public T ReplaceItem(T newItem, uint index)

System.Collections.IEnumerable.GetEnumerator()

SvgLists.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.