Class EntityCollection
Represents a collection of DLS entities.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.Base.dll
Syntax
public abstract class EntityCollection : XDLSSerializableCollection, IXDLSSerializableCollection, IEntityCollectionBase, ICollectionBase, IEnumerable
Properties
FirstItem
Gets the first item from the collection.
Declaration
public Entity FirstItem { get; }
Property Value
Type | Description |
---|---|
Entity | The Entity at the first index. |
Item[Int32]
Gets the Entity at the specified index.
Declaration
public Entity this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the entity to get. |
Property Value
Type | Description |
---|---|
Entity | The Entity at the specified index. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The index is not valid index in the IEntityCollectionBase. |
LastItem
Gets the last item from the collection.
Declaration
public Entity LastItem { get; }
Property Value
Type | Description |
---|---|
Entity | The Entity at the last index. |
TypesOfElement
Gets the type of the elements present in the collection.
Declaration
protected abstract Type[] TypesOfElement { get; }
Property Value
Type | Description |
---|---|
System.Type[] | The System.Type collection that contains the types of the elements. |
Methods
Add(IEntity)
Adds the specified entity to the collection.
Declaration
public int Add(IEntity entity)
Parameters
Type | Name | Description |
---|---|---|
IEntity | entity | The Entity to be added to the collection. |
Returns
Type | Description |
---|---|
System.Int32 | The zero-based index of the Entity. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when paragraph is added to CheckBox and Picture content control. |
Clear()
Removes all items from the collection.
Declaration
public void Clear()
Contains(IEntity)
Determines whether an entity is in the collection.
Declaration
public bool Contains(IEntity entity)
Parameters
Type | Name | Description |
---|---|---|
IEntity | entity | The Entity to be found in the collection. |
Returns
Type | Description |
---|---|
System.Boolean | True if it contains the specified entity, otherwise false. |
IndexOf(IEntity)
Returns the zero-based index of the specified entity.
Declaration
public int IndexOf(IEntity entity)
Parameters
Type | Name | Description |
---|---|---|
IEntity | entity | The Entity to which the index to be found. |
Returns
Type | Description |
---|---|
System.Int32 | The zero-based index of the specified entity. |
Insert(Int32, IEntity)
Inserts a entity into the collection at the specified index.
Declaration
public void Insert(int index, IEntity entity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The integer that specifies the index to insert the entity. |
IEntity | entity | The Entity to be inserted. |
OnClear()
Occurs when all items are removed.
Declaration
protected virtual void OnClear()
OnInsert(Int32, Entity)
Occurs when entity is inserted.
Declaration
protected virtual void OnInsert(int index, Entity entity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index to insert the entity. |
Entity | entity | The Entity to insert. |
OnInsertComplete(Int32, Entity)
Occurs when entity is inserted.
Declaration
protected virtual void OnInsertComplete(int index, Entity entity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index to insert the entity. |
Entity | entity | The Entity to insert. |
OnRemove(Int32)
occurs when entity is removed.
Declaration
protected virtual void OnRemove(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index to remove the entity. |
Remove(IEntity)
Removes the entity from the collection.
Declaration
public void Remove(IEntity entity)
Parameters
Type | Name | Description |
---|---|---|
IEntity | entity | The Entity to be removed. |
RemoveAt(Int32)
Removes the entity at the specified index from the collection.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the entity to be removed. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The index is not valid in the EntityCollection. |