コード例 #1
0
 public override Statement CloneStatementOnly()
 {
     UnsafeBlockStatement result = new UnsafeBlockStatement(new StatementCollection());
     foreach (Statement s in this.Statements)
     {
         result.AddStatement(s.CloneStatementOnly());
     }
     CopyParentAndLabel(result);
     return result;
 }
コード例 #2
0
 public BlockStatement Process(DecompilationContext context, BlockStatement body)
 {
     V_0 = context.get_MethodContext().get_Method();
     if (!V_0.get_IsUnsafe() && V_0.get_HasBody() && this.IsUnsafe(V_0.get_Body().get_Instructions()))
     {
         V_1 = new UnsafeBlockStatement(body.get_Statements());
         body.set_Statements(new StatementCollection());
         body.AddStatement(V_1);
     }
     return(body);
 }
コード例 #3
0
        public override Statement CloneStatementOnly()
        {
            UnsafeBlockStatement result = new UnsafeBlockStatement(new StatementCollection());

            foreach (Statement s in this.Statements)
            {
                result.AddStatement(s.CloneStatementOnly());
            }
            CopyParentAndLabel(result);
            return(result);
        }
コード例 #4
0
        public BlockStatement Process(DecompilationContext context, BlockStatement body)
        {
            MethodDefinition method = context.MethodContext.Method;

            if (!method.IsUnsafe && method.HasBody && IsUnsafe(method.Body.Instructions))
            {
                UnsafeBlockStatement unsafeStatement = new UnsafeBlockStatement(body.Statements);
                body.Statements = new StatementCollection();
                body.AddStatement(unsafeStatement);
            }

            return(body);
        }
コード例 #5
0
 public virtual void VisitUnsafeBlockStatement(UnsafeBlockStatement unsafeBlock)
 {
     Visit(unsafeBlock.Statements);
 }
コード例 #6
0
 public virtual void VisitUnsafeBlockStatement(UnsafeBlockStatement unsafeBlock)
 {
     this.Visit(unsafeBlock.get_Statements());
     return;
 }