System.Linq.Expressions.Error.UnhandledUnary C# (CSharp) Method

UnhandledUnary() static private method

ArgumentException with message like "Unhandled unary: {0}"
static private UnhandledUnary ( object p0 ) : Exception
p0 object
return Exception
        internal static Exception UnhandledUnary(object p0)
        {
            return new ArgumentException(Strings.UnhandledUnary(p0));
        }
        /// <summary>

Usage Example

Example #1
0
        /// <summary>
        /// Creates an expression representing a unary assignment operation.
        /// </summary>
        /// <param name="unaryType">The type of assignment represented.</param>
        /// <param name="operand">The operand of the assignment operation, i.e. the assignment target.</param>
        /// <param name="method">The method implementing the assignment operation.</param>
        /// <returns>A new <see cref="AssignUnaryCSharpExpression"/> instance representing the unary assignment.</returns>
        public static AssignUnaryCSharpExpression MakeUnaryAssign(CSharpExpressionType unaryType, Expression operand, MethodInfo method)
        {
            switch (unaryType)
            {
            case CSharpExpressionType.PreIncrementAssign:
                return(PreIncrementAssign(operand, method));

            case CSharpExpressionType.PreIncrementAssignChecked:
                return(PreIncrementAssignChecked(operand, method));

            case CSharpExpressionType.PreDecrementAssign:
                return(PreDecrementAssign(operand, method));

            case CSharpExpressionType.PreDecrementAssignChecked:
                return(PreDecrementAssignChecked(operand, method));

            case CSharpExpressionType.PostIncrementAssign:
                return(PostIncrementAssign(operand, method));

            case CSharpExpressionType.PostIncrementAssignChecked:
                return(PostIncrementAssignChecked(operand, method));

            case CSharpExpressionType.PostDecrementAssign:
                return(PostDecrementAssign(operand, method));

            case CSharpExpressionType.PostDecrementAssignChecked:
                return(PostDecrementAssignChecked(operand, method));
            }

            throw LinqError.UnhandledUnary(unaryType);
        }
All Usage Examples Of System.Linq.Expressions.Error::UnhandledUnary
Error