/// <summary> /// Interprets and highlight the given string as C# code /// and return the resulting FormattedCode instance. /// </summary> /// <param name="csharpCode">A string read as C# code. /// This parameter must not be null.</param> /// <returns>A FormattedCode instance containing data /// to highlight the text with basic syntax coloring.</returns> public FormattedCode Format(string csharpCode) { UiExceptionHelper.CheckNotNull(csharpCode, "csharpCode"); _info = FormattedCode.NewCodeInfo(); csharpCode = PreProcess(csharpCode); Parse(csharpCode); return(CSCode); }
/// <summary> /// Builds a new instance of CSharpCodeFormatter. /// </summary> public CSharpCodeFormatter() { _info = FormattedCode.NewCodeInfo(); return; }