コード例 #1
0
 internal HierarchyCollectionInternal(AdomdConnection connection, Set axis, string cubeName) : base(connection)
 {
     this.connection = connection;
     this.axis       = axis;
     this.cubeName   = cubeName;
     this.internalTableCollection = axis.AxisDataset;
 }
 internal Axis(AdomdConnection connection, IDSFDataSet dataset, string cubeName, CellSet cellSet, int axisOrdinal)
 {
     this.cellset     = cellSet;
     this.axisOrdinal = axisOrdinal;
     this.set         = new Set(connection, dataset, cubeName, this);
     this.positions   = new PositionCollection(connection, this.set, cubeName);
 }
 public Cell this[ICollection indexes]
 {
     get
     {
         if (indexes.Count != this.cellset.Axes.Count)
         {
             throw new ArgumentException(SR.CellIndexer_InvalidNumberOfAxesIndexers(this.cellset.Axes.Count, indexes.Count), "indexes");
         }
         int         num        = 0;
         int         num2       = 1;
         IEnumerator enumerator = indexes.GetEnumerator();
         for (int i = 0; i < indexes.Count; i++)
         {
             enumerator.MoveNext();
             IDSFDataSet iDSFDataSet = this.cellset.Formatter.AxesList[i];
             int         num3        = iDSFDataSet[0].Rows.Count;
             if (!(enumerator.Current is int))
             {
                 throw new ArgumentException(SR.CellIndexer_InvalidIndexType(i), "indexes");
             }
             int num4 = (int)enumerator.Current;
             if (num4 < 0 || num4 >= num3)
             {
                 throw new ArgumentOutOfRangeException("index #" + i.ToString(CultureInfo.CurrentCulture), num4, SR.CellIndexer_IndexOutOfRange(i, num3));
             }
             num  += num2 * num4;
             num2 *= num3;
         }
         return(new Cell(this.cellset.Formatter.CellTable, num, this.GetRowByOrdinal(num), this.cellset));
     }
 }
コード例 #4
0
 internal AxisTupleMemberCollection(AdomdConnection connection, Tuple tuple, string cubeName)
 {
     this.connection          = connection;
     this.tuple               = tuple;
     this.internalAxisMembers = tuple.Axis.AxisDataset;
     this.cubeName            = cubeName;
 }
 internal Set(AdomdConnection connection, IDSFDataSet dataset, string cubeName, Axis axis)
 {
     this.axisDataset = dataset;
     this.cubeName    = cubeName;
     this.hierarchies = new HierarchyCollection(connection, this, cubeName);
     this.tuples      = new TupleCollection(connection, this, cubeName);
     this.axis        = axis;
 }
 public Axis this[int index]
 {
     get
     {
         if (index < 0 || index >= this.Count)
         {
             throw new ArgumentOutOfRangeException("index");
         }
         IDSFDataSet dataset = this.internalCollection[index];
         return(new Axis(this.connection, dataset, this.cubeName, this.cellset, index));
     }
 }
        private MemberCollection ExecuteMembersQuery(string memberMdxQuery, Level parentLevel, Member parentMember, int memberAxisPosition, int memberHierarhcyPosition)
        {
            if (memberAxisPosition < 0)
            {
                throw new ArgumentOutOfRangeException("memberAxisPosition");
            }
            if (memberHierarhcyPosition < 0)
            {
                throw new ArgumentOutOfRangeException("memberHierarhcyPosition");
            }
            AdomdConnection connection = this.Connection;

            if (connection == null)
            {
                throw new NotSupportedException(SR.NotSupportedWhenConnectionMissing);
            }
            AdomdUtils.CheckConnectionOpened(connection);
            AdomdCommand adomdCommand = new AdomdCommand(memberMdxQuery, connection);
            CellSet      cellSet      = adomdCommand.ExecuteCellSet();

            if (memberAxisPosition >= cellSet.Axes.Count)
            {
                throw new ArgumentOutOfRangeException("memberAxisPosition");
            }
            Axis        axis        = cellSet.Axes[memberAxisPosition];
            IDSFDataSet axisDataset = axis.Set.AxisDataset;
            DataTable   memberHierarchyDataTable = null;

            if (memberHierarhcyPosition != 0 || axisDataset.Count != 0)
            {
                if (memberHierarhcyPosition >= axisDataset.Count)
                {
                    throw new ArgumentOutOfRangeException("memberHierarhcyPosition");
                }
                memberHierarchyDataTable = axisDataset[memberHierarhcyPosition];
            }
            return(new MemberCollection(connection, memberHierarchyDataTable, this.Name, parentLevel, parentMember));
        }
 internal int Add(IDSFDataSet set)
 {
     return(this.collection.Add(set));
 }
コード例 #9
0
 internal OlapInfoAxis(IDSFDataSet axisDataSet)
 {
     this.axisDataSet = axisDataSet;
 }
 internal OlapInfoHierarchyCollection(IDSFDataSet hierarchiesDataSet)
 {
     this.hierarchiesDataSet = hierarchiesDataSet;
 }