Class SVGListBase
Namespace: Aspose.Html.Dom.Svg.Collections
Assembly: Aspose.HTML.dll (25.2.0)
This interface defines a base list of all SVG lists.
[DOMObject]
[DOMNoInterfaceObject]
[ComVisible(true)]
public abstract class SVGListBase<t> : SVGValueType, INotifyPropertyChanged, IDisposable, IEnumerable<t>, IEnumerable
Type Parameters
T
Type of item stored in list.
Inheritance
object ← DOMObject ← SVGValueType ← SVGListBase<t>
Implements
INotifyPropertyChanged, IDisposable, IEnumerable<t>, IEnumerable
Inherited Members
SVGValueType.Dispose(), SVGValueType.Dispose(bool), DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
SVGListBase()
Initializes a new instance of the Aspose.Html.Dom.Svg.Collections.SVGListBase`1 class.
protected SVGListBase()
SVGListBase(IEnumerable<t>)
Initializes a new instance of the Aspose.Html.Dom.Svg.Collections.SVGListBase`1 class.
protected SVGListBase(IEnumerable<t> enumerable)
Parameters
enumerable
IEnumerable<t>
The enumerable.
Properties
Length
The number of items in the list.
[DOMName("length")]
public ulong Length { get; }
Property Value
NumberOfItems
The number of items in the list.
[DOMName("numberOfItems")]
public ulong NumberOfItems { get; }
Property Value
this[ulong]
Returns the indexth item in the list.
[DOMName("item")]
public T this[ulong index] { get; set; }
Property Value
T
Exceptions
Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR. Raised when the list cannot be modified.
Code Aspose.Html.Dom.DOMException.INDEX_SIZE_ERR. Raised if the index number is greater than or equal to numberOfItems.
Methods
AppendItem(T)
Inserts a new item at the end of the list.
[DOMName("appendItem")]
public T AppendItem(T newItem)
Parameters
newItem
T
The item which is to be inserted. The first item is number 0.
Returns
T
The inserted item.
Exceptions
Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR. Raised when the list cannot be modified.
Clear()
Clears all existing current items from the list, with the result being an empty list.
[DOMName("clear")]
public void Clear()
Exceptions
Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR. Raised when the list cannot be modified.
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected override void Dispose(bool disposing)
Parameters
disposing
bool
true
to release both managed and unmanaged resources; false
to release only unmanaged resources.
GetEnumerator()
Gets the enumerator.
public IEnumerator<t> GetEnumerator()
Returns
IEnumerator<t>
An System.Collections.IEnumerator object that can be used to iterate through the collection.
GetItem(ulong)
Returns the specified item from the list.
[DOMName("getItem")]
public T GetItem(ulong index)
Parameters
index
ulong
The index of the item from the list which is to be returned. The first item is number 0.
Returns
T
The selected item.
Exceptions
Code Aspose.Html.Dom.DOMException.INDEX_SIZE_ERR. Raised if the index number is greater than or equal to numberOfItems.
Initialize(T)
Clears all existing current items from the list and re-initializes the list to hold the single item specified by the parameter.
[DOMName("initialize")]
public T Initialize(T newItem)
Parameters
newItem
T
The item which should become the only member of the list.
Returns
T
The item being inserted into the list.
Exceptions
Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR. Raised when the list cannot be modified.
InsertItemBefore(T, ulong)
Inserts a new item into the list at the specified position. The first item is number 0.
[DOMName("insertItemBefore")]
public T InsertItemBefore(T newItem, ulong index)
Parameters
newItem
T
The item which is to be inserted into the list.
index
ulong
The index of the item before which the new item is to be inserted. The first item is number 0. If the index is equal to 0, then the new item is inserted at the front of the list. If the index is greater than or equal to numberOfItems, then the new item is appended to the end of the list.
Returns
T
The inserted item.
Exceptions
Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR. Raised when the list cannot be modified.
RemoveItem(ulong)
Removes an existing item from the list.
[DOMName("removeItem")]
public T RemoveItem(ulong index)
Parameters
index
ulong
The index of the item which is to be removed. The first item is number 0.
Returns
T
The removed item.
Exceptions
Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR. Raised when the list cannot be modified.
Code Aspose.Html.Dom.DOMException.INDEX_SIZE_ERR. Raised if the index number is greater than or equal to numberOfItems.
ReplaceItem(T, ulong)
Replaces an existing item in the list with a new item.
[DOMName("replaceItem")]
public T ReplaceItem(T newItem, ulong index)
Parameters
newItem
T
The item which is to be inserted into the list.
index
ulong
The index of the item which is to be replaced. The first item is number 0.
Returns
T
The inserted item.
Exceptions
Code Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR. Raised when the list cannot be modified.
Code Aspose.Html.Dom.DOMException.INDEX_SIZE_ERR. Raised if the index number is greater than or equal to numberOfItems.
See Also
IEnumerable<t> </t></t></t></t></t></t>