本文整理汇总了C#中ICodeVisitor类的典型用法代码示例。如果您正苦于以下问题:C# ICodeVisitor类的具体用法?C# ICodeVisitor怎么用?C# ICodeVisitor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ICodeVisitor类属于命名空间,在下文中一共展示了ICodeVisitor类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Dispatch
public override void Dispatch(ICodeVisitor visitor) {
CompileTimeConstant labelIndex = new CompileTimeConstant(this.rootClass.GetLabelIndex(this.TargetLabel.Name), this.TargetLabel.SourceLocation);
labelIndex.SetContainingExpression(this.TargetLabel);
List<Expression> arguments = new List<Expression>(1);
arguments.Add(labelIndex);
IMethodDefinition constructor = Dummy.Method;
foreach (IMethodDefinition cons in this.rootClass.TypeDefinition.GetMembersNamed(this.Compilation.NameTable.Ctor, false)) {
constructor = cons; break;
}
Expression thisArgument = new CreateObjectInstanceForResolvedConstructor(constructor, arguments, this.SourceLocation);
//^ assume this.ContainingBlock.ContainingMethodDeclaration != null;
MethodCall mcall = new ResolvedMethodCall(this.rootClass.MainMethod.MethodDefinition, thisArgument, new List<Expression>(0), this.SourceLocation);
ExpressionStatement gosub = new ExpressionStatement(mcall);
gosub.Dispatch(visitor);
}
开发者ID:mestriga,项目名称:Microsoft.CciSamples,代码行数:15,代码来源:Statements.cs
示例2: Accept
public static void Accept(this Collection<ExceptionHandler> col, ICodeVisitor visitor)
{
col.ToList().ForEach(e => visitor.VisitExceptionHandler(e));
}
开发者ID:cessationoftime,项目名称:nroles,代码行数:4,代码来源:VisitableCollectionExtensions.cs
示例3: Dispatch
/// <summary>
///
/// </summary>
/// <param name="visitor"></param>
public void Dispatch(ICodeVisitor visitor) {
visitor.Visit(this);
}
开发者ID:Refresh06,项目名称:visualmutator,代码行数:7,代码来源:Statements.cs
示例4: Accept
public abstract void Accept(ICodeVisitor visitor);
开发者ID:NALSS,项目名称:Telegraph,代码行数:1,代码来源:VariableReference.cs
示例5: Dispatch
public override void Dispatch(ICodeVisitor visitor)
{
this.WrappedStatement.Dispatch(visitor);
}
开发者ID:edgar-pek,项目名称:VCDryad,代码行数:4,代码来源:Statements.cs
示例6: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitInstructionCollection (this);
}
开发者ID:nobled,项目名称:mono,代码行数:4,代码来源:InstructionCollection.cs
示例7: Dispatch
public void Dispatch(ICodeVisitor visitor) {
}
开发者ID:xornand,项目名称:cci,代码行数:2,代码来源:DummyObjects.cs
示例8: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitMethodBody (this);
if (HasVariables)
m_variables.Accept (visitor);
m_instructions.Accept (visitor);
if (HasExceptionHandlers)
m_exceptions.Accept (visitor);
if (HasScopes)
m_scopes.Accept (visitor);
visitor.TerminateMethodBody (this);
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:13,代码来源:MethodBody.cs
示例9: Dispatch
/// <summary>
/// Calls visitor.Visit(INamedArgument).
/// </summary>
public override void Dispatch(ICodeVisitor visitor)
{
visitor.Visit((INamedArgument)this);
}
开发者ID:Refresh06,项目名称:visualmutator,代码行数:7,代码来源:Expressions.cs
示例10: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitVariableDefinitionCollection (this);
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:4,代码来源:VariableDefinitionCollection.cs
示例11: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitScopeCollection (this);
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:4,代码来源:ScopeCollection.cs
示例12: Accept
public override void Accept (ICodeVisitor visitor)
{
visitor.VisitVariableDefinition (this);
}
开发者ID:nobled,项目名称:mono,代码行数:4,代码来源:VariableDefinition.cs
示例13: Dispatch
public override void Dispatch(ICodeVisitor visitor)
{
//Debug.Assert(false); //Objects of this class are not supposed to escape.
}
开发者ID:riverar,项目名称:devtools,代码行数:4,代码来源:HelperObjects.cs
示例14: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitScope (this);
}
开发者ID:nobled,项目名称:mono,代码行数:4,代码来源:Scope.cs
示例15: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitExceptionHandler (this);
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:4,代码来源:ExceptionHandler.cs
示例16: Dispatch
public override void Dispatch(ICodeVisitor visitor)
{
throw new NotImplementedException();
}
开发者ID:riverar,项目名称:devtools,代码行数:4,代码来源:Helpers.cs
示例17: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitMethodBody (this);
m_variables.Accept (visitor);
m_instructions.Accept (visitor);
m_exceptions.Accept (visitor);
visitor.TerminateMethodBody (this);
}
开发者ID:pusp,项目名称:o2platform,代码行数:9,代码来源:MethodBody.cs
示例18: Dispatch
public override void Dispatch(ICodeVisitor visitor)
{
this.Expression.Dispatch(visitor);
}
开发者ID:edgar-pek,项目名称:VCDryad,代码行数:4,代码来源:Expressions.cs
注:本文中的ICodeVisitor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论