[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.FormattingBagList-1

Class FormattingBagList<T>

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents a list of FormattingBag items.

public abstract class FormattingBagList<T> : FormattingBag, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable where T : FormattingBag

Type Parameters

T
Inheritance
object
FormattingBagList<T>
Implements
System.Collections.Generic.IReadOnlyList<T><T>
System.Collections.Generic.IReadOnlyCollection<T><T>
System.Collections.Generic.IEnumerable<T><T>
System.Collections.IEnumerable
Inherited Members
object.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
object.MemberwiseClone()

Properties

Count

Gets count of items in the list.

public int Count { get; }

Property Value

int

this[int]

Gets the item by its index in the list.

public T this[int index] { get; }

Parameters

index int

The item index in the list.

Property Value

T

An item by its index in the list.

Items

Gets the list of items id.

protected List<Guid> Items { get; set; }

Property Value

System.Collections.Generic.List<T><System.Guid>

Methods

Clear()

Removes all items from the list.

public virtual void Clear()

Equals(FormattingBagList<T>)

protected bool Equals(FormattingBagList<T> other)

Parameters

other FormattingBagList<T>

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

FixInheritedValues()

Fixes all inherited values as "direct" values for this instance.

protected override void FixInheritedValues()

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<T> GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<T><T>

An enumerator that can be used to iterate through the collection.

GetHashCode()

public override int GetHashCode()

Returns

int

IndexOf(T)

Searches for the specified object and returns the zero-based index of the first occurrence within the entire list.

protected int IndexOf(T item)

Parameters

item T

The object to locate in the list.

Returns

int

The zero-based index of the first occurrence of item within the entire lis, if found; otherwise, –1.

Insert(int, Guid)

Inserts a new item to the list.

protected T Insert(int index, Guid guid)

Parameters

index int

The item index.

guid System.Guid

The item GUID.

Returns

T

The inserted item.

Insert(int)

Inserts a new item to the list.

protected T Insert(int index)

Parameters

index int

The item index.

Returns

T

The inserted item.

Remove(int)

Removes an item from the list.

public virtual void Remove(int index)

Parameters

index int

The index of the item to remove.

RemoveAll(Predicate<T>)

Removes items from the list based on predicate.

public virtual int RemoveAll(Predicate<T> match)

Parameters

match System.Predicate<T><T>

Predicate deciding should item be removed or not.

Returns

int