CSLE.CLS_Expression_LoopDowhile.ComputeValue C# (CSharp) Method

ComputeValue() public method

public ComputeValue ( CLS_Content content ) : CLS_Content.Value
content CLS_Content
return CLS_Content.Value
        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            content.DepthAdd();
            ICLS_Expression expr_while = listParam[1] as ICLS_Expression;
            ICLS_Expression expr_block = listParam[0] as ICLS_Expression;

            CLS_Content.Value vrt = null;
            do
            {
                if (expr_block != null)
                {
                    if (expr_block is CLS_Expression_Block)
                    {
                        var v = expr_block.ComputeValue(content);
                        if (v != null)
                        {
                            if (v.breakBlock > 2) vrt = v;
                            if (v.breakBlock > 1) break;
                        }
                    }
                    else
                    {
                        content.DepthAdd();
                        bool bbreak = false;
                        var v = expr_block.ComputeValue(content);
                        if (v != null)
                        {
                            if (v.breakBlock > 2) vrt = v;
                            if (v.breakBlock > 1) bbreak = true;
                        }
                        content.DepthRemove();
                        if (bbreak) break;
                    }
                    //if (v.breakBlock == 1) continue;
                    //if (v.breakBlock == 2) break;
                    //if (v.breakBlock == 10) return v;
                }
            } while ((bool)expr_while.ComputeValue(content).value);
            content.DepthRemove();
            content.OutStack(this);
            return vrt;
            //for 逻辑
            //做数学计算
            //从上下文取值
            //_value = null;
        }