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


C# Tokenizer.Get方法代码示例

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


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

示例1: processArgs

 /// @brief	Helper method to process the arguments portion of the script line.
 ///
 ///	@throw	Throws a scriptException on failure
 ///
 /// @param	testInfo	The Info to populate from the script file.
 /// @param	args		The args portion of the script line.
 private void processArgs(Info testInfo, string args)
 {
     Tokenizer t = new Tokenizer(args, m_argDelimiter);
     for (; t.HasToken(); t++)
     {
         this.processArg(testInfo, t.Get());
     }
 }
开发者ID:MichaelRoop,项目名称:NET_TestHarness,代码行数:14,代码来源:TextScriptReader.cs

示例2: ProcessLine

        /// @brief	Helper method to process one line of the script file.
        ///
        ///	@throw	Throws a scriptException on failure
        ///
        /// @param	testInfo	The Info to populate from the script file.
        /// @param	str			The line as read from the file.
        private void ProcessLine(Info testInfo, string str)
        {
            str.Trim();

            // Check for empty line or line starting with # comment indicator.
            testInfo.SetActive( str.Length > 0 && str[0] != '#');
            if (testInfo.IsActive()) {
                Tokenizer t = new Tokenizer(str, m_nameDelimiter);
                if (t.HasToken()) {
                    testInfo.SetId( t.Get() );
                    t++;

                    // It is possible for the test to have only a name and no arguments.
                    if (t.HasToken()) {
                        this.processArgs( testInfo, t.Get() );
                    }
                }
            }
        }
开发者ID:MichaelRoop,项目名称:NET_TestHarness,代码行数:25,代码来源:TextScriptReader.cs

示例3: processArg

 /// @brief	Helper method to process one argument string token.
 ///
 /// Each argument should be in the format name=value.
 ///
 ///	@throw	Throws a scriptException on failure
 ///
 /// @param	testInfo	The Info to populate from the script file.
 /// @param	args		The arg token from the script line.
 private void processArg(Info testInfo, string arg)
 {
     char[] delimiters = {'='};
     Tokenizer t = new Tokenizer(arg, delimiters);
     this.scriptAssert(t.Number() == 2, "Invalid Argument Format", arg);
     string name = t.Get();
     t++;
     // TODO - parse the third part (type)
     testInfo.AddArgument(new Arg(name, t.Get(), ""));
 }
开发者ID:MichaelRoop,项目名称:NET_TestHarness,代码行数:18,代码来源:TextScriptReader.cs


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