Пример #1
0
 public static ExpressionBase operator |(ExpressionBase left, CSharpIExpression right)
 {
     if (tfOpCalls.Contains(left))
     {
         tfOpCalls.Remove(left);
         ICSharpLogicalOrExpression  leftSide  = (ICSharpLogicalOrExpression)left.AffixTo(OperatorPrecedences.LogicalOrOperation);
         ICSharpLogicalAndExpression rightSide = (ICSharpLogicalAndExpression)right.AffixTo(OperatorPrecedences.LogicalAndOperation);
         return(new CSharpLogicalOrExpression(leftSide, rightSide));
     }
     else
     {
         ICSharpBitwiseOrExpression          leftSide  = (ICSharpBitwiseOrExpression)left.AffixTo(OperatorPrecedences.BitwiseOrOperation);
         ICSharpBitwiseExclusiveOrExpression rightSide = (ICSharpBitwiseExclusiveOrExpression)right.AffixTo(OperatorPrecedences.BitwiseExclusiveOrOperation);
         return(new CSharpBitwiseOrExpression(leftSide, rightSide));
     }
 }
Пример #2
0
 /// <summary>
 /// Creates a new <see cref="CSharpConditionalExpression"/> with
 /// the <paramref name="checkPart"/>, <paramref name="truePart"/>
 /// and <paramref name="falsePart"/>
 /// provided.
 /// </summary>
 /// <param name="checkPart">The <see cref="ICSharpLogicalOrExpression"/> which relates to the
 /// condition to check.</param>
 /// <param name="truePart">The <see cref="ICSharpConditionalExpression"/> that is
 /// evaluated when <paramref name="checkPart"/> evaluates to true.</param>
 /// <param name="falsePart">The <see cref="ICSharpConditionalExpression"/>
 /// that is evaluated when <paramref name="checkPart"/> evaluates to false.</param>
 public CSharpConditionalExpression(ICSharpLogicalOrExpression checkPart, ICSharpConditionalExpression truePart, ICSharpConditionalExpression falsePart)
 {
     this.checkPart = checkPart;
     this.falsePart = falsePart;
     this.truePart  = truePart;
 }
Пример #3
0
 /// <summary>
 /// Creates a new <see cref="CSharpConditionalExpression"/>
 /// with the <paramref name="termPart"/> provided.
 /// </summary>
 /// <param name="termPart">The <see cref="ICSharpLogicalOrExpression"/>
 /// which makes the <see cref="CSharpConditionalExpression"/> a pass-through.</param>
 public CSharpConditionalExpression(ICSharpLogicalOrExpression termPart)
 {
     this.checkPart = termPart;
 }