Class DimensionCollection
Represents the collection of dimension objects.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Olap.Data
Assembly: Syncfusion.Olap.Base.dll
Syntax
public class DimensionCollection : CollectionBase, IList, ICollection, IEnumerable<Dimension>, IEnumerable
Remarks
A DimensionCollection is created in CubeSchema to hold all the dimension objects of the current cube. It is associated only with CubeSchema.
Constructors
DimensionCollection()
Initializes a new instance of the DimensionCollection class.
Declaration
public DimensionCollection()
DimensionCollection(CubeSchema)
Initializes a new instance of the DimensionCollection class.
Declaration
public DimensionCollection(CubeSchema parent_CubeSchema)
Parameters
Type | Name | Description |
---|---|---|
CubeSchema | parent_CubeSchema | The parent cube schema. |
Properties
Item[Int32]
Gets or sets the Dimension at the specified index.
Declaration
public Dimension this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the dimension. |
Property Value
Type |
---|
Dimension |
Methods
Add(Dimension)
Adds the specified dimension.
Declaration
public int Add(Dimension dimension)
Parameters
Type | Name | Description |
---|---|---|
Dimension | dimension | The dimension which is to be added. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the dimension object in the current collection. |
Contains(Dimension)
Determines whether the collection contains specified dimension.
Declaration
public bool Contains(Dimension dimension)
Parameters
Type | Name | Description |
---|---|---|
Dimension | dimension | The dimension object which is to be searched. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CopyTo(Dimension[], Int32)
Copies all the elements of the current collection to the specified one-dimensional array.
Declaration
public void CopyTo(Dimension[] dimensionArray, int index)
Parameters
Type | Name | Description |
---|---|---|
Dimension[] | dimensionArray | The one-dimensional array that is the destination of the elements copied from the current array. |
System.Int32 | index | The index in array at which copying begins. |
FindByName(String)
Finds the dimension by its name.
Declaration
public Dimension FindByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the dimension. |
Returns
Type | Description |
---|---|
Dimension | The dimension object. |
FindByUniqueName(String)
Finds the dimension by its unique name.
Declaration
public Dimension FindByUniqueName(string uniqueName)
Parameters
Type | Name | Description |
---|---|---|
System.String | uniqueName | The unique name of the dimension. |
Returns
Type | Description |
---|---|
Dimension | The dimension object. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<Dimension> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<Dimension> | An IEnumerator object that can be used to iterate through the collection. |
IndexOf(Dimension)
Gets the index of the specified dimension.
Declaration
public int IndexOf(Dimension dimension)
Parameters
Type | Name | Description |
---|---|---|
Dimension | dimension | The dimension. |
Returns
Type | Description |
---|---|
System.Int32 | The index of the dimension in the collection. |
Insert(Int32, Dimension)
Inserts the dimension at specified index.
Declaration
public void Insert(int index, Dimension dimension)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index at which the dimension has to be inserted. |
Dimension | dimension | The dimension object which is to be inserted. |
OnInsertComplete(Int32, Object)
Performs additional custom processes after inserting a new element into the System.Collections.CollectionBase instance.
Declaration
protected override void OnInsertComplete(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which to insert |
System.Object | value | The new value of the element at |
Overrides
OnSetComplete(Int32, Object, Object)
Performs additional custom processes after setting a value in the System.Collections.CollectionBase instance.
Declaration
protected override void OnSetComplete(int index, object oldValue, object newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which |
System.Object | oldValue | The value to replace with |
System.Object | newValue | The new value of the element at |
Overrides
Remove(Dimension)
Removes the specified dimension.
Declaration
public void Remove(Dimension dimension)
Parameters
Type | Name | Description |
---|---|---|
Dimension | dimension | The dimension object which is to be removed. |
RemoveAt(Int32)
Removes the element at the specified index of the System.Collections.CollectionBase instance. This method is not overridable.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to remove. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException |
|