Beispiel #1
0
        public override int Visit(SqlStringLiteral sqlStringLiteral)
        {
            int hashCode = SqlStringLiteralHashCode;

            hashCode = CombineHashes(hashCode, SqlObjectHasher.Djb2(sqlStringLiteral.Value));
            return(hashCode);
        }
Beispiel #2
0
        public override int Visit(SqlStringLiteral sqlStringLiteral)
        {
            int hashCode = SqlStringLiteralHashCode;

            hashCode = CombineHashes(hashCode, sqlStringLiteral.Value.GetHashCode());
            return(hashCode);
        }
 public override SqlObject Visit(SqlStringLiteral sqlStringLiteral)
 {
     return(SqlStringLiteral.Create(
                this.GetObfuscatedString(
                    sqlStringLiteral.Value,
                    "str",
                    ref this.stringSequenceNumber)));
 }
Beispiel #4
0
        public static SqlStringLiteral Create(string value)
        {
            if (!SqlStringLiteral.FrequentlyUsedStrings.TryGetValue(value, out SqlStringLiteral sqlStringLiteral))
            {
                sqlStringLiteral = new SqlStringLiteral(value);
            }

            return(sqlStringLiteral);
        }
        private SqlStringPathExpression(SqlPathExpression parentPath, SqlStringLiteral value)
            : base(SqlObjectKind.StringPathExpression, parentPath)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }

            this.Value = value;
        }
        public override void Visit(SqlStringLiteral sqlStringLiteral)
        {
            this.writer.Write("\"");

            string escapedString = GetEscapedString(sqlStringLiteral.Value);

            this.writer.Write(escapedString);

            this.writer.Write("\"");
        }
 private SqlStringPathExpression(SqlPathExpression parentPath, SqlStringLiteral value)
     : base(parentPath)
 {
     this.Value = value ?? throw new ArgumentNullException(nameof(value));
 }
 public static SqlStringPathExpression Create(
     SqlPathExpression parentPath,
     SqlStringLiteral value) => new SqlStringPathExpression(parentPath, value);
 public override void Visit(SqlStringLiteral sqlStringLiteral)
 {
     this.writer.Write("\"");
     this.writer.Write(SqlObjectTextSerializer.GetEscapedString(sqlStringLiteral.Value));
     this.writer.Write("\"");
 }
 public abstract void Visit(SqlStringLiteral literal);
 public override void Visit(SqlStringLiteral sqlStringLiteral)
 {
     this.writer.Write("\"");
     SqlObjectTextSerializer.WriteEscapedString(this.writer.GetStringBuilder(), sqlStringLiteral.Value.AsSpan());
     this.writer.Write("\"");
 }