Class SVGListBase

Class SVGListBase

名称: Aspose.Html.Dom.Svg.Collections 编辑: Aspose.HTML.dll (25.4.0)

此界面定义了所有 SVG 列表的基础列表。

[DOMNoInterfaceObject]
[DOMObject]
[ComVisible(true)]
public abstract class SVGListBase<t> : SVGValueType, INotifyPropertyChanged, IDisposable, IEnumerable<t>, IEnumerable

类型参数

T

在列表中存储的物品类型。

Inheritance

object DOMObject SVGValueType SVGListBase

Implements

INotifyPropertyChanged , IDisposable , IEnumerable , IEnumerable

继承人

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()

启动了 Aspose.Html.Dom.Svg.Collections.SVGListBase`1 类的新例子。

protected SVGListBase()

SVGListBase(可数)

启动了 Aspose.Html.Dom.Svg.Collections.SVGListBase`1 类的新例子。

protected SVGListBase(IEnumerable<t> enumerable)

Parameters

enumerable IEnumerable

可数的。

Properties

Length

列表中的项目数量。

[DOMName("length")]
public ulong Length { get; }

财产价值

ulong

NumberOfItems

列表中的项目数量。

[DOMName("numberOfItems")]
public ulong NumberOfItems { get; }

财产价值

ulong

这个[延长]

返回列表中的 indexth 项目。

[DOMName("item")]
public T this[ulong index] { get; set; }

财产价值

T

Exceptions

DOMException

代码 Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR。当列表无法修改时提取。

DOMException

代码 Aspose.Html.Dom.DOMException.INDEX_SIZE_ERR。如果指数数大于或相当于OfItems数。

Methods

AppendItem(T)

在列表结束时输入一个新的项目。

[DOMName("appendItem")]
public T AppendItem(T newItem)

Parameters

newItem T

要输入的项目:第一个项目是0号。

Returns

T

插入的项目。

Exceptions

DOMException

代码 Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR。当列表无法修改时提取。

Clear()

从列表中清除所有现有项目,结果是空的列表。

[DOMName("clear")]
public void Clear()

Exceptions

DOMException

代码 Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR。当列表无法修改时提取。

Dispose(博尔)

发布未管理和 - 可选 - 管理资源。

protected override void Dispose(bool disposing)

Parameters

disposing bool

“真实”释放管理和未管理的资源;“虚假”释放只有未管理的资源。

GetEnumerator()

接到列表。

public IEnumerator<t> GetEnumerator()

Returns

IEnumerator

一个 System.Collections.IEnumerator 对象,可以用来通过收藏进行 iterate。

GetItem(延长)

从列表中返回所指定的项目。

[DOMName("getItem")]
public T GetItem(ulong index)

Parameters

index ulong

从要返回的列表中的项目的指数. 第一项项目是0号。

Returns

T

选择的项目。

Exceptions

DOMException

代码 Aspose.Html.Dom.DOMException.INDEX_SIZE_ERR。如果指数数大于或相当于OfItems数。

Initialize(T)

从列表中清除所有现有项目,并重新启动列表,以保持参数指定的单个项目。

[DOMName("initialize")]
public T Initialize(T newItem)

Parameters

newItem T

该项目将成为列表中唯一的成员。

Returns

T

该项目被列入列表中。

Exceptions

DOMException

代码 Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR。当列表无法修改时提取。

InsertItemBefore(T、后者)

在指定的位置插入列表中的一个新项目,第一个项目是0号。

[DOMName("insertItemBefore")]
public T InsertItemBefore(T newItem, ulong index)

Parameters

newItem T

该项目将被列入列表。

index ulong

如果指数等于0,则新指数在列表的前面输入;如果指数大于或等于数字OfItems,则新指数将添加到列表末尾。

Returns

T

插入的项目。

Exceptions

DOMException

代码 Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR。当列表无法修改时提取。

RemoveItem(延长)

从列表中删除现有项目。

[DOMName("removeItem")]
public T RemoveItem(ulong index)

Parameters

index ulong

要删除的项目的指数:第一个项目是0号。

Returns

T

取消的物品。

Exceptions

DOMException

代码 Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR。当列表无法修改时提取。

DOMException

代码 Aspose.Html.Dom.DOMException.INDEX_SIZE_ERR。如果指数数大于或相当于OfItems数。

ReplaceItem(T、后者)

将列表中的现有项目替换为新项目。

[DOMName("replaceItem")]
public T ReplaceItem(T newItem, ulong index)

Parameters

newItem T

该项目将被列入列表。

index ulong

要取代的项目的指数:第一个项目是0号。

Returns

T

插入的项目。

Exceptions

DOMException

代码 Aspose.Html.Dom.DOMException.NO_MODIFICATION_ALLOWED_ERR。当列表无法修改时提取。

DOMException

代码 Aspose.Html.Dom.DOMException.INDEX_SIZE_ERR。如果指数数大于或相当于OfItems数。

看也

IEnumerable

 中文