public override bool Equals(Expression other)
        {
            LetClause letClause = other as LetClause;

            return(letClause != null &&
                   this.Identifier.Equals(letClause.Identifier) &&
                   this.Expression.Equals(letClause.Expression));
        }
		public override void VisitLetClause(LetClause node)
		{
			WriteKeyword(KeyWordWriter.LinqLet);
			WriteSpace();
			Visit(node.Identifier);
			Write(" = ");
			Visit(node.Expression);
		}
 public virtual void VisitLetClause(LetClause node)
 {
     Visit(node.Identifier);
     Visit(node.Expression);
 }
            private LetClause GenerateLetClause(Dictionary<PropertyDefinition, Expression> propertyToValueMap, VariableReference oldIdentifier)
            {
                PropertyDefinition oldIdentifierProperty = null;
                PropertyDefinition newIdentifierProperty = null;
                foreach (KeyValuePair<PropertyDefinition, Expression> pair in propertyToValueMap)
                {
                    if (pair.Key.Name == oldIdentifier.Name && pair.Value.CodeNodeType == CodeNodeType.VariableReferenceExpression &&
                        (pair.Value as VariableReferenceExpression).Variable == oldIdentifier)
                    {
                        oldIdentifierProperty = pair.Key;
                    }
                    else
                    {
                        newIdentifierProperty = pair.Key;
                    }
                }

                if (oldIdentifierProperty == null || newIdentifierProperty == null)
                {
                    return null;
                }

                Expression newIdentifierValue = propertyToValueMap[newIdentifierProperty];
                
                VariableDefinition newIdentifier = CreateNewIdentifier(newIdentifierProperty.Name, newIdentifierValue.ExpressionType);
                
                LetClause result = new LetClause(new VariableReferenceExpression(newIdentifier, null), newIdentifierValue, null);
                propertyToValueMap[newIdentifierProperty] = result.Identifier;

                return result;
            }