/// <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);
}