当前位置: 首页>>代码示例>>VB.NET>>正文


VB.NET CompilerInfo.GetExtensions方法代码示例

本文整理汇总了VB.NET中System.CodeDom.Compiler.CompilerInfo.GetExtensions方法的典型用法代码示例。如果您正苦于以下问题:VB.NET CompilerInfo.GetExtensions方法的具体用法?VB.NET CompilerInfo.GetExtensions怎么用?VB.NET CompilerInfo.GetExtensions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.CodeDom.Compiler.CompilerInfo的用法示例。


在下文中一共展示了CompilerInfo.GetExtensions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。

示例1: CompilerInfo

Dim allCompilerInfo As CompilerInfo() = CodeDomProvider.GetAllCompilerInfo()
        Dim info As CompilerInfo
        For Each info In  allCompilerInfo

           Dim defaultLanguage As String
           Dim defaultExtension As String

           Dim provider As CodeDomProvider = info.CreateProvider()
           
           ' Display information about this configured provider.
           Console.WriteLine("Language provider:  {0}", _
               provider.ToString())
           Console.WriteLine()
           
           Console.WriteLine("  Supported file extension(s):")
           Dim extension As String
           For Each extension In info.GetExtensions()
              Console.WriteLine("    {0}", extension)
           Next extension
           
           defaultExtension = provider.FileExtension
           If Not defaultExtension.StartsWith(".") Then
              defaultExtension = "." + defaultExtension
           End If

           Console.WriteLine("  Default file extension:  {0}", _
             defaultExtension)
           Console.WriteLine()
           
           Console.WriteLine("  Supported language(s):")
           Dim language As String
           For Each language In  info.GetLanguages()
              Console.WriteLine("    {0}", language)
           Next language
           defaultLanguage = CodeDomProvider.GetLanguageFromExtension(defaultExtension)
           Console.WriteLine("  Default language:        {0}", _
              defaultLanguage)
           Console.WriteLine()
           
           ' Get the compiler settings for this provider.
           Dim langCompilerConfig As CompilerParameters = info.CreateDefaultCompilerParameters()
           
           Console.WriteLine("  Compiler options:        {0}", _
               langCompilerConfig.CompilerOptions)
           Console.WriteLine("  Compiler warning level:  {0}", _
               langCompilerConfig.WarningLevel)
           Console.WriteLine()
        Next info
开发者ID:VB.NET开发者,项目名称:System.CodeDom.Compiler,代码行数:48,代码来源:CompilerInfo.GetExtensions


注:本文中的System.CodeDom.Compiler.CompilerInfo.GetExtensions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。