예제 #1
0
        public override EndIfBrick Convert1(XmlIfLogicEndBrick o, XmlModelConvertContext c)
        {
            var ifBrickConverter   = new IfLogicBrickConverter();
            var elseBrickConverter = new IfLogicElseBrickConverter();

            var result = new EndIfBrick();

            c.Bricks[o]  = result;
            result.Begin = o.IfLogicBeginBrick == null ? null : (IfBrick)ifBrickConverter.Convert(o.IfLogicBeginBrick, c);
            result.Else  = o.IfLogicElseBrick == null ? null : (ElseBrick)elseBrickConverter.Convert(o.IfLogicElseBrick, c);
            return(result);
        }
예제 #2
0
        public override XmlIfLogicEndBrick Convert1(EndIfBrick m, XmlModelConvertBackContext c)
        {
            var ifBrickConverter   = new IfLogicBrickConverter();
            var elseBrickConverter = new IfLogicElseBrickConverter();

            var result = new XmlIfLogicEndBrick();

            c.Bricks[m] = result;
            result.IfLogicBeginBrick = m.Begin == null ? null : (XmlIfLogicBeginBrick)ifBrickConverter.Convert(m.Begin, c);
            result.IfLogicElseBrick  = m.Else == null ? null : (XmlIfLogicElseBrick)elseBrickConverter.Convert(m.Else, c);
            return(result);
        }
        public override XmlIfLogicBeginBrick Convert1(IfBrick m, XmlModelConvertBackContext c)
        {
            var formulaConverter         = new FormulaConverter();
            var ifElseBrickConverter     = new IfLogicElseBrickConverter();
            var ifLogicEndBrickConverter = new IfLogicEndBrickConverter();

            var result = new XmlIfLogicBeginBrick
            {
                IfCondition = m.Condition == null ? new XmlFormula() : formulaConverter.Convert(m.Condition, c)
            };

            c.Bricks[m]             = result;
            result.IfLogicElseBrick = m.Else == null ? null : (XmlIfLogicElseBrick)ifElseBrickConverter.Convert(m.Else, c);
            result.IfLogicEndBrick  = m.End == null ? null : (XmlIfLogicEndBrick)ifLogicEndBrickConverter.Convert(m.End, c);
            return(result);
        }
        public override IfBrick Convert1(XmlIfLogicBeginBrick o, XmlModelConvertContext c)
        {
            var formulaConverter         = new FormulaConverter();
            var ifElseBrickConverter     = new IfLogicElseBrickConverter();
            var ifLogicEndBrickConverter = new IfLogicEndBrickConverter();

            var result = new IfBrick
            {
                Condition = o.IfCondition == null ? null : formulaConverter.Convert(o.IfCondition, c)
            };

            c.Bricks[o] = result;
            result.Else = o.IfLogicElseBrick == null ? null : (ElseBrick)ifElseBrickConverter.Convert(o.IfLogicElseBrick, c);
            result.End  = o.IfLogicEndBrick == null ? null : (EndIfBrick)ifLogicEndBrickConverter.Convert(o.IfLogicEndBrick, c);
            return(result);
        }