public override void Visit(SqlMemberIndexerScalarExpression sqlMemberIndexerScalarExpression)
 {
     sqlMemberIndexerScalarExpression.MemberExpression.Accept(this);
     this.writer.Write("[");
     sqlMemberIndexerScalarExpression.IndexExpression.Accept(this);
     this.writer.Write("]");
 }
Beispiel #2
0
        public override int Visit(SqlMemberIndexerScalarExpression sqlMemberIndexerScalarExpression)
        {
            int hashCode = SqlMemberIndexerScalarExpressionHashCode;

            hashCode = CombineHashes(hashCode, sqlMemberIndexerScalarExpression.MemberExpression.Accept(this));
            hashCode = CombineHashes(hashCode, sqlMemberIndexerScalarExpression.IndexExpression.Accept(this));
            return(hashCode);
        }
        public static SqlMemberIndexerScalarExpression CreateSqlMemberIndexerScalarExpression(
            SqlScalarExpression first,
            SqlScalarExpression second,
            params SqlScalarExpression[] everythingElse)
        {
            List <SqlScalarExpression> segments = new List <SqlScalarExpression>(2 + everythingElse.Length);

            segments.Add(first);
            segments.Add(second);
            segments.AddRange(everythingElse);

            SqlMemberIndexerScalarExpression rootExpression = SqlMemberIndexerScalarExpression.Create(first, second);

            foreach (SqlScalarExpression indexer in segments.Skip(2))
            {
                rootExpression = SqlMemberIndexerScalarExpression.Create(rootExpression, indexer);
            }

            return(rootExpression);
        }
 public override SqlObject Visit(SqlMemberIndexerScalarExpression sqlMemberIndexerScalarExpression)
 {
     return(SqlMemberIndexerScalarExpression.Create(
                sqlMemberIndexerScalarExpression.MemberExpression.Accept(this) as SqlScalarExpression,
                sqlMemberIndexerScalarExpression.IndexExpression.Accept(this) as SqlScalarExpression));
 }
 public abstract void Visit(SqlMemberIndexerScalarExpression scalarExpression);
 protected abstract SqlScalarExpression Visit(SqlMemberIndexerScalarExpression expression);