static TokenCollection GetTokens(TokenLanguage language, string code, bool isMvc, bool isRazor) { switch (language) { case TokenLanguage.CSharp: return(CSharpTokensHelper.GetTokens(code)); case TokenLanguage.Basic: return(VBTokensHelper.GetTokens(code)); case TokenLanguage.JavaScript: return(JavaScriptTokensHelper.GetTokens(code)); case TokenLanguage.Html: if (!isMvc) { return(HtmlTokensHelper.GetTokens(code)); } return(HtmlTokensHelper.GetTokens(code, isRazor ? LanguageKind.Razor : LanguageKind.Html, DotNetLanguageType.CSharp)); case TokenLanguage.Xml: return(new XmlTokensCategoryHelper().GetTokens(code)); case TokenLanguage.Css: return(new CssTokensCategoryHelper().GetTokens(code)); default: return(null); } }
public string GetClassName(TokenLanguage language) { if (this.languagesClassNames.ContainsKey(language)) { return(this.languagesClassNames[language]); } return(this.className); }
public static string GetFormattedCode(TokenLanguage language, string code, bool isMvc, string[] highlightedTagNames) { DevExpress.CodeParser.TokenCollection tokens = GetTokens(language, code, isMvc); if (tokens != null) { return(GetFormattedCode(language, code, tokens, highlightedTagNames)); } return(string.Empty); }
public static string GetFormattedCode(TokenLanguage language, string code, bool isMvc) { var tokens = GetTokens(language, code, isMvc); if (tokens != null) { return(GetFormattedCode(code, tokens)); } return(string.Empty); }
public static string GetFormattedCode(TokenLanguage language, string code, bool isMvc, bool isRazor) { TokenCollection tokens = GetTokens(language, code, isMvc, isRazor); if (tokens != null) { return(GetFormattedCode(code, tokens)); } return(string.Empty); }
static string GetFormattedCode(TokenLanguage language, string code, DevExpress.CodeParser.TokenCollection tokens, string[] highlightedTagNames) { if ((int)language == (int)TokenLanguage.Html && highlightedTagNames.Length != 0 && HasHighlightedTagsOnPage(tokens, highlightedTagNames) || HasHighlightedCodeBlockMarker(code)) { return(GetFormattedAspxCode(code, tokens, highlightedTagNames)); } else { return(GetFormattedOtherCode(code, tokens, highlightedTagNames)); } }
public string GetClassName(TokenLanguage language) { return(_languagesClassNames.ContainsKey(language) ? _languagesClassNames[language] : _className); }
static string GetFormattedCode(TokenLanguage language, string code, DevExpress.CodeParser.TokenCollection tokens, string[] highlightedTagNames) { if((int)language == (int)TokenLanguage.Html && highlightedTagNames.Length != 0 && HasHighlightedTagsOnPage(tokens, highlightedTagNames) || HasHighlightedCodeBlockMarker(code)) return GetFormattedAspxCode(code, tokens, highlightedTagNames); else return GetFormattedOtherCode(code, tokens, highlightedTagNames); }
public static string GetFormattedCode(TokenLanguage language, string code) { return(GetFormattedCode(language, code, false, false)); }
public string GetClassName(TokenLanguage language) { return languagesClassNames.ContainsKey(language) ? languagesClassNames[language] : className; }
static TokenCollection GetTokens(TokenLanguage language, string code, bool isMvc, bool isRazor) { switch (language) { case TokenLanguage.CSharp: return CSharpTokensHelper.GetTokens(code); case TokenLanguage.Basic: return VBTokensHelper.GetTokens(code); case TokenLanguage.JavaScript: return JavaScriptTokensHelper.GetTokens(code); case TokenLanguage.Html: if (!isMvc) return HtmlTokensHelper.GetTokens(code); return HtmlTokensHelper.GetTokens(code, isRazor ? LanguageKind.Razor : LanguageKind.Html, DotNetLanguageType.CSharp); case TokenLanguage.Xml: return new XmlTokensCategoryHelper().GetTokens(code); case TokenLanguage.Css: return new CssTokensCategoryHelper().GetTokens(code); default: return null; } }
public static string GetFormattedCode(TokenLanguage language, string code, bool isMvc, bool isRazor) { TokenCollection tokens = GetTokens(language, code, isMvc, isRazor); if (tokens != null) return GetFormattedCode(code, tokens); return string.Empty; }
public static string GetFormattedCode(TokenLanguage language, string code) { return GetFormattedCode(language, code, false, false); }
public static string GetFormattedCode(TokenLanguage language, string code, bool isMvc, string[] highlightedTagNames) { DevExpress.CodeParser.TokenCollection tokens = GetTokens(language, code, isMvc); if(tokens != null) return GetFormattedCode(language, code, tokens, highlightedTagNames); return string.Empty; }
public string GetClassName(TokenLanguage language) { if(this.languagesClassNames.ContainsKey(language)) return this.languagesClassNames[language]; return this.className; }
public static string GetFormattedCode(TokenLanguage language, string code, bool isMvc) { return(GetFormattedCode(language, code, isMvc, new string[0])); }
public static string GetFormattedCode(TokenLanguage language, string code, bool isMvc) { return GetFormattedCode(language, code, isMvc, new string[0]); }