Class ExtendedFormatsCollection
Represents collection of all extended formats in the workbook.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Collections
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
public class ExtendedFormatsCollection : CollectionBaseEx<ExtendedFormatImpl>, IList<ExtendedFormatImpl>, ICollection<ExtendedFormatImpl>, IEnumerable<ExtendedFormatImpl>, IEnumerable, IParentApplication, ICloneParent
Constructors
ExtendedFormatsCollection(IApplication, Object)
Creates collection and sets its Application and Parent values.
Declaration
public ExtendedFormatsCollection(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object that represents the Excel application. |
System.Object | parent | Parent object of this collection. |
Properties
Item[Int32]
Returns single entry from the collection. Read-only.
Declaration
public ExtendedFormatImpl this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type |
---|
ExtendedFormatImpl |
ParentWorkbook
Returns parent workbook object. Read-only.
Declaration
public WorkbookImpl ParentWorkbook { get; }
Property Value
Type |
---|
WorkbookImpl |
Methods
Add(ExtendedFormatImpl)
Adds format into collection.
Declaration
public ExtendedFormatImpl Add(ExtendedFormatImpl format)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | format | Format to add. |
Returns
Type | Description |
---|---|
ExtendedFormatImpl | If there is same format in the collection, this method will return it; otherwise format that was passed as argument will be added. |
AddIndex(Dictionary<Int32, Object>, IList<ExtendedFormatImpl>, Int32)
Adds index to the collection.
Declaration
public void AddIndex(Dictionary<int, object> hashToAdd, IList<ExtendedFormatImpl> arrXFormats, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.Int32, System.Object> | hashToAdd | Dictionary to add index to. |
System.Collections.Generic.IList<ExtendedFormatImpl> | arrXFormats | List with extended formats. |
System.Int32 | index | Index to add. |
Clone(Object)
Creates copy of the current instance.
Declaration
public override object Clone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Parent object for the new collection. |
Returns
Type | Description |
---|---|
System.Object | Copy of the current instance. |
Overrides
ForceAdd(ExtendedFormatImpl)
Adds format into collection.
Declaration
public ExtendedFormatImpl ForceAdd(ExtendedFormatImpl format)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | format | Format to add. |
Returns
Type | Description |
---|---|
ExtendedFormatImpl | Format that was added. |
GatherTwoFormats(Int32, Int32)
Gather two formats borders.
Declaration
public ExtendedFormatImpl GatherTwoFormats(int iFirstXF, int iEndXF)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iFirstXF | First xf indexes to gathered. |
System.Int32 | iEndXF | End xf indexes to gathered. |
Returns
Type | Description |
---|---|
ExtendedFormatImpl | Returns gathered two extended formats.. |
Import(ExtendedFormatImpl, Dictionary<Int32, Int32>)
Imports single extended format to the collection.
Declaration
public int Import(ExtendedFormatImpl format, Dictionary<int, int> hashExtFormatIndexes)
Parameters
Type | Name | Description |
---|---|---|
ExtendedFormatImpl | format | Format to import. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | hashExtFormatIndexes | Dictionary with new xf indexes, key - old xf index, value - new xf index. |
Returns
Type | Description |
---|---|
System.Int32 | Index of the new format. |
Merge(IList<ExtendedFormatImpl>)
Adds extended formats to the collection.
Declaration
public Dictionary<int, int> Merge(IList<ExtendedFormatImpl> arrXFormats)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<ExtendedFormatImpl> | arrXFormats | Formats to add. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | Dictionary with new indexes. |
Merge(IList<ExtendedFormatImpl>, out Dictionary<Int32, Int32>)
Merges extended formats collection with formats from another collection.
Declaration
public Dictionary<int, int> Merge(IList<ExtendedFormatImpl> arrXFormats, out Dictionary<int, int> dicFontIndexes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<ExtendedFormatImpl> | arrXFormats | Collection to get formats from. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dicFontIndexes | Container for new font indexes. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | Dictionary with new indexes. |
OnClearComplete()
OnClear is invoked after Clear behavior.
Declaration
protected override void OnClearComplete()
Overrides
RemoveAt(Int32)
Removes item at the specified position.
Declaration
public Dictionary<int, int> RemoveAt(int xfIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | xfIndex | Item to remove. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | Dictionary with new xf indexes. key - old index value - new index. Only those formats that had parent index set to xfIndex will be placed in this dictionary. |
SetMaxCount(Int32)
Sets maximum possible count of extended formats in the collections. Updates ParentIndex and overall number of extended formats if necessary.
Declaration
public void SetMaxCount(int maxCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxCount | New value of maximum possible extended formats. |