コード例 #1
0
        public override Builder GetBuilder()
        {
            var builder = new LoopBuilder().SetShape(2,
                                                     Rnd.Float(0.4f, 0.7f),
                                                     Rnd.Float(0f, 0.5f));

            return(builder);
        }
コード例 #2
0
 public BlockStatement Process(DecompilationContext context, BlockStatement body)
 {
     this.methodContext = context.get_MethodContext();
     V_0 = context.get_MethodContext().get_Method().get_Module().get_TypeSystem();
     this.logicalBuilderContext     = new LogicalFlowBuilderContext(context.get_MethodContext().get_ControlFlowGraph());
     this.cfgBlockSplitter          = new CFGBlockSplitter(this.logicalBuilderContext);
     this.conditionBuilder          = new ConditionBuilder(this.logicalBuilderContext, V_0);
     this.loopBuilder               = new LoopBuilder(this.logicalBuilderContext, V_0);
     this.switchBuilder             = new SwitchBuilder(this.logicalBuilderContext);
     this.ifBuilder                 = new IfBuilder(this.logicalBuilderContext, this.methodContext.get_Method().get_Module().get_TypeSystem());
     this.followNodeDeterminator    = new FollowNodeDeterminator(V_0);
     this.yieldGuardedBlocksBuilder = new YieldGuardedBlocksBuilder(this.logicalBuilderContext, context);
     this.GetMaxIndexOfBlock();
     this.InitializeTheBlock();
     this.guardedBlocksBuilder = new GuardedBlocksBuilder(this.logicalBuilderContext);
     context.get_MethodContext().set_LogicalConstructsTree(this.BuildLogicalConstructTree());
     context.get_MethodContext().set_LogicalConstructsContext(this.logicalBuilderContext);
     return(body);
 }
コード例 #3
0
        public BlockStatement Process(DecompilationContext context, BlockStatement body)
        {
            this.methodContext = context.MethodContext;
            TypeSystem typeSystem = context.MethodContext.Method.Module.TypeSystem;

            logicalBuilderContext     = new LogicalFlowBuilderContext(context.MethodContext.ControlFlowGraph);
            cfgBlockSplitter          = new CFGBlockSplitter(logicalBuilderContext);
            conditionBuilder          = new ConditionBuilder(logicalBuilderContext, typeSystem);
            loopBuilder               = new LoopBuilder(logicalBuilderContext, typeSystem);
            switchBuilder             = new SwitchBuilder(logicalBuilderContext);
            ifBuilder                 = new IfBuilder(logicalBuilderContext, methodContext.Method.Module.TypeSystem);
            followNodeDeterminator    = new FollowNodeDeterminator(typeSystem);
            yieldGuardedBlocksBuilder = new YieldGuardedBlocksBuilder(logicalBuilderContext, context);

            GetMaxIndexOfBlock();
            InitializeTheBlock();

            guardedBlocksBuilder = new GuardedBlocksBuilder(logicalBuilderContext);

            context.MethodContext.LogicalConstructsTree    = BuildLogicalConstructTree();
            context.MethodContext.LogicalConstructsContext = logicalBuilderContext;

            return(body);
        }
コード例 #4
0
ファイル: Level.cs プロジェクト: PixelMute/MysteryRogueLite
    protected virtual Builder GetBuilder()
    {
        var res = new LoopBuilder();

        return(res);
    }