public override bool Equals(Expression other)
        {
            if (!(other is YieldReturnExpression))
            {
                return(false);
            }
            YieldReturnExpression yieldReturn = other as YieldReturnExpression;

            if (this.Expression == null)
            {
                return(yieldReturn.Expression == null);
            }
            return(this.Expression.Equals(yieldReturn.Expression));
        }
        public override Expression CloneExpressionOnly()
        {
            YieldReturnExpression result = new YieldReturnExpression(Expression.CloneExpressionOnly(), null);

            return(result);
        }
        public override Expression Clone()
        {
            YieldReturnExpression result = new YieldReturnExpression(Expression.Clone(), this.instructions);

            return(result);
        }
 public override Expression CloneExpressionOnly()
 {
     YieldReturnExpression result = new YieldReturnExpression(Expression.CloneExpressionOnly(), null);
     return result;
 }
        public override Expression Clone()
        {
			YieldReturnExpression result = new YieldReturnExpression(Expression.Clone(), this.instructions);
			return result;
        }
 public override void VisitYieldReturnExpression(YieldReturnExpression node)
 {
     // TODO: We could take the return type from the method which we're decompiling
     WriteKeyword(KeyWordWriter.Return);
     WriteSpace();
     WriteKeyword(KeyWordWriter.New);
     WriteSpace();
     var expressionType = GetExpressionType(node.Expression);
     if (expressionType != null)
     {
         WriteReferenceAndNamespaceIfInCollision(expressionType);
     }
     else
     {
         string typeName = "Object";
         if (node.Expression.CodeNodeType == CodeNodeType.LiteralExpression)
         {
             typeName = GetExpressionType((LiteralExpression)node.Expression);
         }
         WriteKeyword(typeName);
     }
     WriteToken("(");
     WriteToken(")");
     WriteSpace();
     WriteToken("{");
     WriteSpace();
     Visit(node.Expression);
     WriteSpace();
     WriteToken("}");
 }
 public override void VisitYieldReturnExpression(YieldReturnExpression node)
 {
     WriteKeyword("yield");
     WriteSpace();
     WriteKeyword("return");
     WriteSpace();
     Visit(node.Expression);
 }
 public virtual void VisitYieldReturnExpression(YieldReturnExpression node)
 {
     Visit(node.Expression);
 }
 public override void VisitYieldReturnExpression(YieldReturnExpression node)
 {
     if (state == SearchState.Propagation)
     {
         canBePropagated = false;
         return;
     }
     base.VisitYieldReturnExpression(node);
 }