private MdxExpression GetWrappedExpression(MdxExpression expr, IList <DrillActionContainer> actions) { if (actions == null) { return(expr); } //foreach (DrillActionContainer container in actions) //{ // if (container.Action != null) // { // if (container.Action is MdxActionBase) // { // if (passedHierarchies.Contains(container.HierarchyUniqueName)) // { // ((MdxActionBase)container.Action).ConcretizeMdxObject = null; // } // else // { // ((MdxActionBase)container.Action).ConcretizeMdxObject = this.ConcretizeMdxObject; // } // } // MdxExpression newExpr = container.Action.Process(expr, new MdxActionContext(container.HierarchyUniqueName, container.MemberUniqueName)) as MdxExpression; // if (!passedHierarchies.Contains(container.HierarchyUniqueName)) // { // passedHierarchies.Add(container.HierarchyUniqueName); // } // if (newExpr != null) // expr = newExpr; // } // if (container.Children != null && container.Children.Count > 0) // expr = GetWrappedExpression(expr, container.Children); //} var processor = new DrillActionProcessor(actions, this.ConcretizeMdxObject); expr = processor.Process(expr); return(expr); }
private MdxExpression GetWrappedExpression(MdxExpression expr, IList<DrillActionContainer> actions) { if (actions == null) return expr; //foreach (DrillActionContainer container in actions) //{ // if (container.Action != null) // { // if (container.Action is MdxActionBase) // { // if (passedHierarchies.Contains(container.HierarchyUniqueName)) // { // ((MdxActionBase)container.Action).ConcretizeMdxObject = null; // } // else // { // ((MdxActionBase)container.Action).ConcretizeMdxObject = this.ConcretizeMdxObject; // } // } // MdxExpression newExpr = container.Action.Process(expr, new MdxActionContext(container.HierarchyUniqueName, container.MemberUniqueName)) as MdxExpression; // if (!passedHierarchies.Contains(container.HierarchyUniqueName)) // { // passedHierarchies.Add(container.HierarchyUniqueName); // } // if (newExpr != null) // expr = newExpr; // } // if (container.Children != null && container.Children.Count > 0) // expr = GetWrappedExpression(expr, container.Children); //} var processor = new DrillActionProcessor(actions, this.ConcretizeMdxObject); expr = processor.Process(expr); return expr; }