コード例 #1
0
        public CodeLanguage(CodeLanguages language, CodeStructures codeStructure = CodeStructures.None)
        {
            if (codeStructure == CodeStructures.None)
            {
                switch (language)
                {
                case CodeLanguages.HTML:
                case CodeLanguages.XML:
                    codeStructure = CodeStructures.Xml;
                    break;

                case CodeLanguages.C:
                case CodeLanguages.CSharp:
                    codeStructure = CodeStructures.C;
                    break;

                case CodeLanguages.Blazor:
                case CodeLanguages.Razor:
                    codeStructure = CodeStructures.razor;
                    break;
                }
            }

            FoundSynonymous = true;
            CodeStructure   = codeStructure;
            Language        = language;
        }
コード例 #2
0
 public void SetLanguage(CodeLanguages language, CodeStructures codeStructure = CodeStructures.None)
 {
     FoundSynonymous = true;
     CodeStructure   = codeStructure;
     Language        = language;
 }