AssignmentType() public static method

public static AssignmentType ( AssignmentKind kind ) : string
kind AssignmentKind
return string
示例#1
0
 internal override string ToString(string indent)
 {
     if (OneLine())
     {
         return(string.Format(CultureInfo.InvariantCulture, "{0}{1} {2} {3}", indent, VariableName,
                              TsqlFragmentToString.AssignmentType(AssignmentType),
                              Expression.ToString("")));
     }
     return(string.Format(CultureInfo.InvariantCulture, "{0}{1} {2}\r\n", indent, VariableName,
                          TsqlFragmentToString.AssignmentType(AssignmentType)) + Expression.ToString(indent + " "));
 }
示例#2
0
        internal override string ToString(string indent)
        {
            string str = null;

            if (Column != null)
            {
                str = string.Format(CultureInfo.CurrentCulture, "{0} {1} ", Column.ToString(indent), TsqlFragmentToString.AssignmentType(AssignmentKind));

                if (OneLine())
                {
                    if (NewValue != null)
                    {
                        str += NewValue.ToString("");
                    }
                    else if (Variable != null)
                    {
                        str += Variable;
                    }
                }
                else
                {
                    if (NewValue != null)
                    {
                        str = string.Format(CultureInfo.CurrentCulture, "{0}\r\n{1}", str, NewValue.ToString(indent + " "));
                    }
                    else if (Variable != null)
                    {
                        str = string.Format(CultureInfo.CurrentCulture, "{0}\r\n{1}{2}", str, indent, Variable);
                    }
                }
            }
            else
            {
                str = string.Format(CultureInfo.CurrentCulture, "{0} {1} ", Variable, TsqlFragmentToString.AssignmentType(AssignmentKind));

                str = str + NewValue.ToString(indent);
            }
            return(str);
        }