Example #1
0
        private static object ConvertLanguageToCssClass(CodeBlockLanguage language)
        {
            switch (language)
            {
            case CodeBlockLanguage.Csharp:
                return("language-csharp");

            case CodeBlockLanguage.Java:
                return("language-java");

            case CodeBlockLanguage.Http:
                return("language-javascript");

            case CodeBlockLanguage.Json:
                return("language-javascript");

            case CodeBlockLanguage.Plain:
                return("language-none");

            case CodeBlockLanguage.Xml:
                return("language-none");

            case CodeBlockLanguage.Python:
                return("language-python");

            default:
                throw new NotSupportedException(language.ToString());
            }
        }
Example #2
0
        private static string ConvertLanguageToCssClass(CodeBlockLanguage language)
        {
            switch (language)
            {
            case CodeBlockLanguage.Csharp:
                return("language-csharp");

            case CodeBlockLanguage.Java:
                return("language-java");

            case CodeBlockLanguage.Http:
                return("language-http");

            case CodeBlockLanguage.Json:
                return("language-json");

            case CodeBlockLanguage.Plain:
                return("language-none");

            case CodeBlockLanguage.Xml:
                return("language-xml");

            case CodeBlockLanguage.Python:
                return("language-python");

            case CodeBlockLanguage.Bash:
                return("language-bash");

            case CodeBlockLanguage.Batch:
                return("language-batch");

            case CodeBlockLanguage.Git:
                return("language-git");

            case CodeBlockLanguage.Go:
                return("language-go");

            case CodeBlockLanguage.Html:
                return("language-html");

            case CodeBlockLanguage.JavaScript:
                return("language-javascript");

            case CodeBlockLanguage.PowerShell:
                return("language-powershell");

            case CodeBlockLanguage.Ruby:
                return("language-ruby");

            case CodeBlockLanguage.Sql:
                return("language-sql");

            default:
                throw new NotSupportedException(language.ToString());
            }
        }
Example #3
0
 private static object ConvertLanguageToCssClass(CodeBlockLanguage language)
 {
     switch (language)
     {
         case CodeBlockLanguage.Csharp:
             return "language-csharp";
         case CodeBlockLanguage.Java:
             return "language-java";
         case CodeBlockLanguage.Http:
             return "language-javascript";
         case CodeBlockLanguage.Json:
             return "language-javascript";
         case CodeBlockLanguage.Plain:
             return "language-none";
         case CodeBlockLanguage.Xml:
             return "language-none";
         default:
             throw new NotSupportedException(language.ToString());
     }
 }