Example #1
0
        public override ElseBrick Convert1(XmlIfLogicElseBrick o, XmlModelConvertContext c)
        {
            var ifLogicBeginBrickConverter = new IfLogicBrickConverter();
            var ifLogicEndBrickConverter   = new IfLogicEndBrickConverter();

            var result = new ElseBrick();

            c.Bricks[o]  = result;
            result.Begin = o.IfLogicBeginBrick == null ? null : (IfBrick)ifLogicBeginBrickConverter.Convert(o.IfLogicBeginBrick, c);
            result.End   = o.IfLogicEndBrick == null ? null : (EndIfBrick)ifLogicEndBrickConverter.Convert(o.IfLogicEndBrick, c);
            return(result);
        }
Example #2
0
        public override XmlIfLogicElseBrick Convert1(ElseBrick m, XmlModelConvertBackContext c)
        {
            var ifLogicBeginBrickConverter = new IfLogicBrickConverter();
            var ifLogicEndBrickConverter   = new IfLogicEndBrickConverter();

            var result = new XmlIfLogicElseBrick();

            c.Bricks[m] = result;
            result.IfLogicBeginBrick = m.Begin == null ? null : (XmlIfLogicBeginBrick)ifLogicBeginBrickConverter.Convert(m.Begin, c);
            result.IfLogicEndBrick   = m.End == null ? null : (XmlIfLogicEndBrick)ifLogicEndBrickConverter.Convert(m.End, 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);
        }