当前位置: 首页>>代码示例>>C#>>正文


C# Runtime.ImportStandard方法代码示例

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


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

示例1: Run

        public void Run(string[] args)
        {
            CommandLine commandLine = new CommandLine();
            commandLine.AddOption("Verbose", false, "-verbose");

            commandLine.Parse(args);

            if ((bool)commandLine.GetOption("-h"))
            {
                commandLine.Help("Katahdin Interpreter");
                return;
            }

            Runtime runtime = new Runtime(true, false, false, false,
                (bool)commandLine.GetOption("-verbose"));

            //new ConsoleParseTrace(runtime);

            runtime.SetUp(commandLine.Args);

            if (!((bool)commandLine.GetOption("-nostd")))
                runtime.ImportStandard();

            foreach (string file in commandLine.Files)
                runtime.Import(file);
        }
开发者ID:schuster-rainer,项目名称:katahdin,代码行数:26,代码来源:EntryPoint.cs

示例2: Main

        public static void Main(string[] args)
        {
            try
            {
                CommandLine commandLine = new CommandLine();
                commandLine.AddOption("Verbose", false, "-verbose");
                
                commandLine.Parse(args);
            
                if ((bool) commandLine.GetOption("-h"))
                {
                    commandLine.Help("Katahdin Interpreter");
                    return;
                }
                
                Runtime runtime = new Runtime(true, false, false, false,
                    (bool) commandLine.GetOption("-verbose"));
                
                //new ConsoleParseTrace(runtime);
                
                runtime.SetUp(commandLine.Args);
                
                if (!((bool) commandLine.GetOption("-nostd")))
                    runtime.ImportStandard();
                
                foreach (string file in commandLine.Files)
                    runtime.Import(file);
            }
            catch (Exception e)
            {
                /*while (true)
                {
                    TargetInvocationException wrapper
                        = e as TargetInvocationException;

                    if (wrapper == null)
                        break;

                    e = wrapper.InnerException;
                }*/
                
                Console.Error.WriteLine(e);
            }
        }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:44,代码来源:EntryPoint.cs


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