/// <summary> /// Gets a cell value of the cube. /// </summary> /// <param name="elements">A list of dimension element names that reference the cell.</param> /// <returns>An object representing the cell value. If the cell did not exist the return value is null.</returns> public object GetCell(System.Collections.Specialized.StringCollection elements) { if (Dimensions == null) { return(null); } if (_dimensions.Count != elements.Count) { throw new System.ArgumentException(CreateExceptionString(_elementMismatch)); } return(NativeOlapApi.CubeGetCell(_server.Store.ClientSlot, _serverHandle, _name, elements, _server.LastErrorInternal)); }
/// <summary> /// Gets a cell value of the cube. /// </summary> /// <param name="firstElement">The first element name.</param> /// <param name="secondElement">The second element name.</param> /// <param name="elements">A variable list of additional dimension elements that reference the cell.</param> /// <returns>An object representing the cell value. If the cell did not exist the return value is null.</returns> public object GetCell(string firstElement, string secondElement, params string[] elements) { if (Dimensions == null) { return(null); } int total = 2; if (elements != null) { total += elements.Length; } if (_dimensions.Count != total) { throw new System.ArgumentException(CreateExceptionString(_elementMismatch)); } return(NativeOlapApi.CubeGetCell(_server.Store.ClientSlot, _serverHandle, _name, firstElement, secondElement, elements, _server.LastErrorInternal)); }