public UnorderedListItemNode(INode[] children, SourceRange sourceRange) { if(null == children) throw Xception.Because.ArgumentNull(() => children); _children = children; _sourceRange = sourceRange; }
public DefinitionListDefinitionNode(INode[] children, SourceRange sourceRange) { if(null == children) throw Xception.Because.ArgumentNull(() => children); if(null == sourceRange) throw Xception.Because.ArgumentNull(() => sourceRange); _children = children; _sourceRange = sourceRange; }
public DefinitionListItemNode(DefinitionListTermNode term, DefinitionListDefinitionNode[] definitions, SourceRange sourceRange) { if(null == term) throw Xception.Because.ArgumentNull(() => term); if(null == definitions) throw Xception.Because.ArgumentNull(() => definitions); if(null == sourceRange) throw Xception.Because.ArgumentNull(() => sourceRange); if(!definitions.Any()) throw Xception.Because.Argument(() => definitions, "cannot be empty"); _term = term; _definitions = definitions; _sourceRange = sourceRange; }
public TableCellNode(TableCellKind kind, int columnSpan, int rowSpan, IInlineNode[] children, SourceRange sourceRange) { if(null == children) throw Xception.Because.ArgumentNull(() => children); if(!(rowSpan > 0)) throw Xception.Because.Argument(() => rowSpan, "must be a positive integer"); if(!(columnSpan > 0)) throw Xception.Because.Argument(() => columnSpan, "must be a positive integer"); _kind = kind; _rowSpan = rowSpan; _columnSpan = columnSpan; _children = children; _sourceRange = sourceRange; }
public OrderedListItemLineInfo(EnumeratorInfo enumerator, IEnumerable<LineInfo> lines, SourceRange sourceRange) : base(lines, sourceRange) { Enumerator = enumerator; }
/// <summary> /// Calculate a new <see cref="SourceRange"/> starting at this value and extending through the provided <see cref="end"/> range. /// </summary> /// <param name="end">The ending <see cref="SourceRange"/> used to calculate the extent of the resulting <see cref="SourceRange"/>.</param> /// <returns>A new <see cref="SourceRange"/> at the current value's position extending throught the provided <paramref name="end"/>.</returns> public SourceRange Through(SourceRange end) { if(null == end) throw Xception.Because.ArgumentNull(() => end); return new SourceRange(Index, end.Index - Index + end.Length, Line, LineIndex); }