예제 #1
0
        internal MdxSelectStatement GenerateCurrentStatement(MdxQueryContext MdxQueryContext)
        {
            var newAxes = Axes;

            for (int i = 0; i < Axes.Count; i++)
            {
                var axis    = Axes[i];
                var cntAxis = MdxQueryContext.Axes[i];
                var newAxis = axis.GenerateCurrentAxis(cntAxis);
                if (!object.ReferenceEquals(axis, newAxis))

                {
                    if (newAxes == Axes)
                    {
                        newAxes = (MdxObjectList <MdxAxis>)Axes.Clone();
                    }

                    newAxes[i] = newAxis;
                }
            }
            if (newAxes == Axes)
            {
                return(this);
            }

            var result = new MdxSelectStatement(With, newAxes, Where, CubeSpecification);

            return(result);
        }
		internal MdxSelectStatement GenerateCurrentStatement(MdxQueryContext MdxQueryContext)
		{
			var newAxes=Axes;
			
			for(int i=0;i<Axes.Count;i++)
			{
				var axis = Axes[i];
				var cntAxis=MdxQueryContext.Axes[i];
				var newAxis = axis.GenerateCurrentAxis(cntAxis);
				if (!object.ReferenceEquals(axis,newAxis))
				
				{
					if (newAxes==Axes)
						newAxes = (MdxObjectList<MdxAxis>)Axes.Clone();

					newAxes[i] = newAxis;
				}
			}
			if (newAxes==Axes)
				return this;
				
			var result=new MdxSelectStatement(With,newAxes,Where,CubeSpecification);
			return result;
		}