本文整理汇总了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();
}
示例2: Execute
public override void Execute( Command command, Thread thread, Scope scope )
{
scope.Declare( command.Identifier,
new TLSub( command.InnerBlock, scope ) );
thread.Advance();
}
示例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 ) );
}
示例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();
}
示例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();
}
示例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();
}
}
示例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();
}
示例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();
}
示例9: ExitInnerBlock
public override void ExitInnerBlock( Command command, Thread thread, Scope scope )
{
thread.Advance();
}