System.Linq.Expressions.Expression.GetUserDefinedUnaryOperatorOrThrow C# (CSharp) Method

GetUserDefinedUnaryOperatorOrThrow() private static method

private static GetUserDefinedUnaryOperatorOrThrow ( ExpressionType unaryType, string name, Expression operand ) : UnaryExpression
unaryType ExpressionType
name string
operand Expression
return UnaryExpression
        private static UnaryExpression GetUserDefinedUnaryOperatorOrThrow(ExpressionType unaryType, string name, Expression operand)
        {
            UnaryExpression u = GetUserDefinedUnaryOperator(unaryType, name, operand);
            if (u != null)
            {
                ValidateParamswithOperandsOrThrow(u.Method.GetParametersCached()[0].ParameterType, operand.Type, unaryType, name);
                return u;
            }
            throw Error.UnaryOperatorNotDefined(unaryType, operand.Type);
        }
Expression