From ed08c83289ed63ed0a3322a6a8ae143ad1b1f749 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 21 May 2011 17:21:59 +0200 Subject: [PATCH] Make ConvertChar and ConvertString public. --- .../CSharp/OutputVisitor/OutputVisitor.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs b/NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs index ee76d82ee..da524257d 100644 --- a/NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs +++ b/NRefactory/ICSharpCode.NRefactory/CSharp/OutputVisitor/OutputVisitor.cs @@ -941,7 +941,11 @@ namespace ICSharpCode.NRefactory.CSharp return ConvertChar(ch); } - static string ConvertChar(char ch) + /// + /// Gets the escape sequence for the specified character. + /// + /// This method does not convert ' or ". + public static string ConvertChar(char ch) { switch (ch) { case '\\': @@ -973,7 +977,10 @@ namespace ICSharpCode.NRefactory.CSharp } } - static string ConvertString(string str) + /// + /// Converts special characters to escape sequences within the given string. + /// + public static string ConvertString(string str) { StringBuilder sb = new StringBuilder(); foreach (char ch in str) {