Represents Mdx function specificion.
Inheritance: MdxExpressionBase, IMdxMember, IMdxExpression
Esempio n. 1
0
        /// <summary>
        /// Appends the specified <see cref="MdxFunction"/> and returns the updated current instance of <see cref="MdxTuple"/>.
        /// If there are any <see cref="MdxSet"/>s in <see cref="Children"/> then specified <see cref="MdxFunction"/>
        /// is appended to the last <see cref="MdxSet"/>.
        /// </summary>
        /// <param name="function">Specified <see cref="MdxFunction"/>.</param>
        /// <returns>Returns the updated current instance of <see cref="MdxTuple"/>.</returns>
        public MdxTuple With(MdxFunction function)
        {
            var lastSet = _children.OfType <MdxSet>().LastOrDefault();

            if (lastSet == null)
            {
                _children.Add(function);

                return(this);
            }

            lastSet.With(function);

            return(this);
        }
Esempio n. 2
0
        /// <summary>
        /// Appends the specified <see cref="MdxFunction"/> and returns the updated current instance of <see cref="MdxSet"/>. 
        /// If there are any <see cref="MdxTuple"/>s in <see cref="Children"/> then specified <see cref="MdxFunction"/> 
        /// is appended to the last <see cref="MdxTuple"/>.
        /// </summary>
        /// <param name="function">Specified <see cref="MdxFunction"/>.</param>
        /// <returns>Returns the updated current instance of <see cref="MdxSet"/>.</returns>
        public MdxSet With(MdxFunction function)
        {
            var lastTuple = _children.OfType<MdxTuple>().LastOrDefault();
            if (lastTuple == null)
            {
                _children.Add(function);

                return this;
            }

            lastTuple.With(function);

            return this;
        }