コード例 #1
0
 internal override string ToString(string indent, bool useSquareBracket)
 {
     return(MultiPartIdentifier != null
         ? string.Format(CultureInfo.CurrentCulture, "{0}{1}", indent,
                         MultiPartIdentifier.ToString("", useSquareBracket))
         : "");
 }
コード例 #2
0
        public string ToString(bool illegalCharReplace = true)
        {
            var identifier = MultiPartIdentifier.ToString();

            // Alias with dot and whitespace is illegal in documentDB, so they will be replaced by "_"
            return(ColumnName != null
                ? string.Format(CultureInfo.CurrentCulture, "{0} AS {1}", identifier, illegalCharReplace?ColumnName.Replace(".", "_").Replace(" ", "_") : ColumnName)
                : identifier);
        }
コード例 #3
0
 internal override string ToString(string indent)
 {
     if (Alias == null || Alias.Length == 0)
     {
         return(string.Format("{0}{1}", indent, MultiPartIdentifier.ToString()));
     }
     else
     {
         return(string.Format("{0}{1} AS {2}", indent, MultiPartIdentifier.ToString(), Alias));
     }
 }
コード例 #4
0
        internal override string ToString(string indent)
        {
            StringBuilder sb = new StringBuilder(64);

            if (Alias == null || Alias.Length == 0)
            {
                sb.Append(string.Format("{0}{1}", indent, MultiPartIdentifier.ToString()));
            }
            else
            {
                sb.Append(string.Format("{0}{1} AS {2}", indent, MultiPartIdentifier.ToString(), Alias));
            }
            return(sb.ToString());
        }