Пример #1
0
        /// <summary>
        /// Retrieve SingleValueNode operand from given token.
        /// </summary>
        /// <param name="unaryOperatorToken">The token</param>
        /// <returns>the SingleValueNode operand</returns>
        private SingleValueNode GetOperandFromToken(UnaryOperatorToken unaryOperatorToken)
        {
            SingleValueNode operand = this.bindMethod(unaryOperatorToken.Operand) as SingleValueNode;

            if (operand == null)
            {
                throw new ODataException(ODataErrorStrings.MetadataBinder_UnaryOperatorOperandNotSingleValue(unaryOperatorToken.OperatorKind.ToString()));
            }

            return(operand);
        }