Ejemplo n.º 1
0
 /// <summary>
 /// Creates an addition expression.
 /// </summary>
 /// <param name="left">The left operand.</param>
 /// <param name="right">The right operand.</param>
 /// <returns>An addition expression.</returns>
 public static CodeBinaryOperatorExpression Add(this CodeExpression left, CodeVariableDeclarationStatement right)
 {
     return new CodeBinaryOperatorExpression(left, CodeBinaryOperatorType.Add, right.Reference());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates an identity-inequality expression.
 /// </summary>
 /// <param name="left">The left operand.</param>
 /// <param name="right">The right operand.</param>
 /// <returns>A identity-inequality expression.</returns>
 public static CodeBinaryOperatorExpression IdentityInequality(this CodeExpression left, CodeVariableDeclarationStatement right)
 {
     return new CodeBinaryOperatorExpression(left, CodeBinaryOperatorType.IdentityInequality, right.Reference());
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a delegate-create expression.
 /// </summary>
 /// <param name="type">The type of the delegate.</param>
 /// <param name="variable">The object on which the delegate is created.</param>
 /// <param name="methodName">The name of the method that gets invoked when the delegate is invoked.</param>
 /// <returns>A delegate-create expression.</returns>
 public static CodeDelegateCreateExpression CreateDelegate(this CodeTypeReference type, CodeVariableDeclarationStatement variable, string methodName)
 {
     return type.CreateDelegate(variable.Reference(), methodName);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a greater-than-or-equal expression.
 /// </summary>
 /// <param name="left">The left operand.</param>
 /// <param name="right">The right operand.</param>
 /// <returns>A greater-than-or-equal expression.</returns>
 public static CodeBinaryOperatorExpression GreaterThanOrEqual(this CodeExpression left, CodeVariableDeclarationStatement right)
 {
     return new CodeBinaryOperatorExpression(left, CodeBinaryOperatorType.GreaterThanOrEqual, right.Reference());
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Creates an assignment statement.
 /// </summary>
 /// <param name="left">The left operand.</param>
 /// <param name="right">The right operand.</param>
 /// <returns>An assignment statement.</returns>
 public static CodeAssignStatement Assign(this CodeExpression left, CodeVariableDeclarationStatement right)
 {
     return left.Assign(right.Reference());
 }