public static IUsingBlockStatement Using(this IBlockStatementParent parent, ILocalDeclarationsStatement resourceAcquisition)
        {
            var usingStatement = new UsingBlockStatement(parent, resourceAcquisition);

            parent.Add(usingStatement);
            return(usingStatement);
        }
示例#2
0
 public ILocalDeclarationsStatement GetDeclarationStatement(params ILocalMember[] siblings)
 {
     if (this.singletonDeclaration == null)
     {
         this.singletonDeclaration = new LocalDeclarationsStatement(this.AsEnumerable().Concat(siblings), this.Parent);
     }
     return(this.singletonDeclaration);
 }
 public override bool Visit(ILocalDeclarationsStatement statement, IStatement context)
 {
     _stack.Push(statement);
     try
     {
         return(base.Visit(statement, context));
     }
     finally
     {
         _stack.Pop();
     }
 }
示例#4
0
 public abstract IStatement Transform(ILocalDeclarationsStatement statement);
示例#5
0
 void IStatementVisitor.Visit(ILocalDeclarationsStatement statement)
 {
     this.Translate(statement);
 }
示例#6
0
 TransformationImpact IStatementVisitor <TransformationImpact> .Visit(ILocalDeclarationsStatement statement)
 {
     return(CalculateRefactorImpact(statement));
 }
示例#7
0
 public abstract TransformationImpact CalculateRefactorImpact(ILocalDeclarationsStatement statement);
示例#8
0
 public bool Visit(ILocalDeclarationsStatement statement, TContext context)
 {
     return(false);
 }
示例#9
0
 public abstract void Translate(ILocalDeclarationsStatement statement);
示例#10
0
 public TransformationKind Visit(ILocalDeclarationsStatement statement, ITransformationContext context)
 {
     throw new NotImplementedException();
 }
 public IterationDeclarationBlockStatement(IBlockStatementParent parent, ILocalDeclarationsStatement localDeclaration, IExpression condition, IEnumerable <IStatementExpression> iterations)
     : base(parent, condition, iterations)
 {
     this.LocalDeclaration = localDeclaration;
 }