public string ToPresentationString() { StringBuilder sb = new StringBuilder(); sb.Append("dBx: " + DelimBx.ToString()); sb.Append(" dc: " + DelimClass.ToString()); if ((DelimClass != DelimClassification.Whitespace) && (DelimClass != DelimClassification.EndOfString)) { sb.Append(" dv: " + this.DelimValue); } sb.Append(" " + ToValuePresentationString()); return(sb.ToString()); }
public string ToDelimPresentationString() { StringBuilder sb = new StringBuilder(); sb.Append("dBx: " + DelimBx.ToString()); sb.Append(" dc: " + DelimClass.ToString()); // delim value switch (DelimClass) { case DelimClassification.EndOfString: break; case DelimClassification.Whitespace: if ((this.TextTraits.NewLineIsWhitespace == true) && (this.TextTraits.NewLinePatterns.Contains(this.DelimValue))) { sb.Append(" dv: " + "CRLF"); } break; case DelimClassification.DividerSymbol: string s1 = this.DelimValue; if (this.DelimValue.IndexOf(",") != -1) { s1 = "COMMA"; } else if (this.DelimValue.IndexOf(";") != -1) { s1 = "SEMICOLON"; } sb.Append(" dv: " + s1); break; default: sb.Append(" dv: " + this.DelimValue); break; } return(sb.ToString()); }