Esempio n. 1
0
 /*!*/
 public MappingNode Map(Dictionary<Node, Node> value, string tag, IDictionary/*!*/ mapping, FlowStyle flowStyle)
 {
     foreach (DictionaryEntry entry in mapping) {
         value.Add(RepresentItem(entry.Key), RepresentItem(entry.Value));
     }
     return new MappingNode(tag, value, flowStyle);
 }
Esempio n. 2
0
        public SequenceNode /*!*/ Sequence(string tag, IList /*!*/ sequence, FlowStyle flowStyle)
        {
            List <Node> value = new List <Node>(sequence.Count);

            foreach (object x in sequence)
            {
                value.Add(RepresentItem(x));
            }
            return(new SequenceNode(tag, value, flowStyle));
        }
Esempio n. 3
0
 protected ElementSpecification Element(Unit innerWidth = default(Unit),
     Unit innerHeight = default(Unit),
     bool breakable = false,
     bool followLineHeight = false,
     FlowStyle flow = FlowStyle.Float,
     Unit border = default(Unit),
     bool keepWithNextLine = false,
     Behaviors behavior = null,
     IEnumerable<ElementSpecification> children = null)
 {
     var line = ChildElement(innerWidth, innerHeight, breakable, followLineHeight, flow, border, keepWithNextLine, behavior, children);
     elements.Add(line);
     return line;
 }
Esempio n. 4
0
        protected ElementSpecification Element(Unit innerWidth = default(Unit),
            Unit innerHeight = default(Unit),
            bool breakable = false,
            bool followLineHeight = false,
            FlowStyle flow = FlowStyle.Float,
            Unit border = default(Unit),
            bool keepWithNextLine = false,
            IEnumerable<ElementSpecification> children = null)
        {
            var element = new TestSpecification(children != null ? children.ToList() : new List<ElementSpecification>())
            {
                InnerHeight = innerHeight,
                InnerWidth = innerWidth,
                FollowLineHeight = followLineHeight,
                Flow = flow,
                KeepWithNextLine = keepWithNextLine,
                Breakable = breakable,
                Margins = new Margins { Bottom = border, Left = border, Right = border, Top = border }
            };

            return element;
        }
Esempio n. 5
0
 public MappingStartEvent(string anchor, string tag, FlowStyle flowStyle)
     : base(anchor, tag, flowStyle)
 {
 }
Esempio n. 6
0
 internal CollectionStartEvent(string anchor, string tag, FlowStyle flowStyle)
     : base(anchor)
 {
     _tag = tag != "!" ? tag : null;
     _flowStyle = flowStyle;
 }
Esempio n. 7
0
 public SequenceStartEvent(string anchor, string tag, FlowStyle flowStyle)
     : base(anchor, tag, flowStyle)
 {
 }
Esempio n. 8
0
 public MappingStartEvent(string anchor, string tag, FlowStyle flowStyle)
     : base(anchor, tag, flowStyle)
 {
 }
Esempio n. 9
0
 internal CollectionNode(string tag, FlowStyle flowStyle)
     : base(tag)
 {
     FlowStyle = flowStyle;
 }
Esempio n. 10
0
 public SequenceNode/*!*/ Sequence(string tag, IList/*!*/ sequence, FlowStyle flowStyle) {
     List<Node> value = new List<Node>(sequence.Count);
     foreach (object x in sequence) {
         value.Add(RepresentItem(x));
     }
     return new SequenceNode(tag, value, flowStyle);
 }
Esempio n. 11
0
 public MappingNode /*!*/ Map(Dictionary <Node, Node> value, string tag, IDictionary /*!*/ mapping, FlowStyle flowStyle)
 {
     foreach (DictionaryEntry entry in mapping)
     {
         value.Add(RepresentItem(entry.Key), RepresentItem(entry.Value));
     }
     return(new MappingNode(tag, value, flowStyle));
 }
Esempio n. 12
0
 public MappingNode /*!*/ Map(string tag, IDictionary /*!*/ mapping, FlowStyle flowStyle)
 {
     return(Map(new Dictionary <Node, Node>(mapping.Count), tag, mapping, flowStyle));
 }
Esempio n. 13
0
 public SequenceNode(string tag, IList<Node>/*!*/ nodes, FlowStyle flowStyle)
     : base(tag, flowStyle) {
     _nodes = nodes;
 }
Esempio n. 14
0
 internal CollectionNode(string tag, FlowStyle flowStyle)
     : base(tag) {
     FlowStyle = flowStyle;
 }
Esempio n. 15
0
 public MappingNode(string tag, IDictionary<Node, Node>/*!*/ nodes, FlowStyle flowStyle)
     : base(tag, flowStyle) {
     _nodes = nodes;
 }
Esempio n. 16
0
 public SequenceStartEvent(string anchor, string tag, FlowStyle flowStyle)
     : base(anchor, tag, flowStyle)
 {
 }
Esempio n. 17
0
 internal CollectionStartEvent(string anchor, string tag, FlowStyle flowStyle)
     : base(anchor)
 {
     _tag       = tag != "!" ? tag : null;
     _flowStyle = flowStyle;
 }
Esempio n. 18
0
 public SequenceNode(string tag, IList <Node> /*!*/ nodes, FlowStyle flowStyle)
     : base(tag, flowStyle)
 {
     _nodes = nodes;
 }
Esempio n. 19
0
 public MappingNode/*!*/ Map(string tag, IDictionary/*!*/ mapping, FlowStyle flowStyle) {
     return Map(new Dictionary<Node, Node>(mapping.Count), tag, mapping, flowStyle);
 }
Esempio n. 20
0
 public MappingNode(string tag, IDictionary <Node, Node> /*!*/ nodes, FlowStyle flowStyle)
     : base(tag, flowStyle)
 {
     _nodes = nodes;
 }