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


C# Thread.Advance方法代码示例

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


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

示例1: ExitInnerBlock

 public override void ExitInnerBlock( Command command, Thread thread, Scope scope )
 {
     if ( new TLBit( command.ParamExpression.Evaluate( scope ) ).Value )
         thread.EnterBlock( command.InnerBlock );
     else
         thread.Advance();
 }
开发者ID:Metapyziks,项目名称:ThreadedLanguageExp,代码行数:7,代码来源:CmdWhl.cs

示例2: Execute

        public override void Execute( Command command, Thread thread, Scope scope )
        {
            scope.Declare( command.Identifier,
                new TLSub( command.InnerBlock, scope ) );

            thread.Advance();
        }
开发者ID:Metapyziks,项目名称:ThreadedLanguageExp,代码行数:7,代码来源:CmdDefSub.cs

示例3: ExitInnerBlock

 public override void ExitInnerBlock( Command command, Thread thread, Scope scope )
 {
     do
         thread.Advance();
     while ( thread.CurrentCommand != null && (
         thread.CurrentCommand.CommandType is CmdEls ||
         thread.CurrentCommand.CommandType is CmdEif ) );
 }
开发者ID:Metapyziks,项目名称:ThreadedLanguageExp,代码行数:8,代码来源:CmdEif.cs

示例4: Execute

        public override void Execute( Command command, Thread thread, Scope scope )
        {
            scope[ command.Identifier ] =
                TLObject.Convert( scope[ command.Identifier ].GetType(),
                command.ParamExpression.Evaluate( scope ) );

            thread.Advance();
        }
开发者ID:Metapyziks,项目名称:ThreadedLanguageExp,代码行数:8,代码来源:CmdSet.cs

示例5: Execute

        public override void Execute( Command command, Thread thread, Scope scope )
        {
            TLSub sub = scope[ command.ParamIdentifiers[ 0 ] ] as TLSub;

            Thread newThread = new Thread( sub.Block, sub.Scope );
            scope.Declare( command.Identifier, new TLThr( newThread ) );
            ThreadLang.StartThread( newThread );

            thread.Advance();
        }
开发者ID:Metapyziks,项目名称:ThreadedLanguageExp,代码行数:10,代码来源:CmdThr.cs

示例6: Execute

        public override void Execute( Command command, Thread thread, Scope scope )
        {
            TLStr stream = ( command.ParamExpression.Evaluate( scope ) as TLStr );

            if ( stream.DataWaiting )
            {
                scope[ command.Identifier ] =
                    ( command.ParamExpression.Evaluate( scope ) as TLStr ).Read();

                thread.Advance();
            }
        }
开发者ID:Metapyziks,项目名称:ThreadedLanguageExp,代码行数:12,代码来源:CmdInp.cs

示例7: Execute

        public override void Execute( Command command, Thread thread, Scope scope )
        {
            if ( command.ParamExpression != null )
            {
                scope.Declare( command.Identifier,
                    new TLStr( command.ParamExpression.Evaluate( scope ) ) );
            }
            else
                scope.Declare( command.Identifier, new TLStr() );

            thread.Advance();
        }
开发者ID:Metapyziks,项目名称:ThreadedLanguageExp,代码行数:12,代码来源:CmdDefStr.cs

示例8: Execute

        public override void Execute( Command command, Thread thread, Scope scope )
        {
            TLObject val = command.ParamExpression.Evaluate( scope );
            TLStr str = scope[ command.Identifier ] as TLStr;

            if ( val is TLByt )
                str.Write( val as TLByt );
            else
            {
                TLStr data = ( val as TLStr );
                while ( data.DataWaiting )
                    str.Write( data.Read() );
            }

            thread.Advance();
        }
开发者ID:Metapyziks,项目名称:ThreadedLanguageExp,代码行数:16,代码来源:CmdOut.cs

示例9: ExitInnerBlock

 public override void ExitInnerBlock( Command command, Thread thread, Scope scope )
 {
     thread.Advance();
 }
开发者ID:Metapyziks,项目名称:ThreadedLanguageExp,代码行数:4,代码来源:CmdRun.cs


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